[ofa-general] [PATCH] Stop ib_fmr from contributing to the load average

Anton Blanchard anton at samba.org
Thu Oct 25 14:25:38 PDT 2007


I noticed my machine was at a constant load average of 1. This was
because ib_create_fmr_pool calls kthread_create but does not immediately
wake the thread up.

Change to using kthread_run so we enter ib_fmr_cleanup_thread, set
TASK_INTERRUPTIBLE, then go to sleep.

Signed-off-by: Anton Blanchard <anton at samba.org>
---

diff --git a/drivers/infiniband/core/fmr_pool.c b/drivers/infiniband/core/fmr_pool.c
index d7f6452..2218450 100644
--- a/drivers/infiniband/core/fmr_pool.c
+++ b/drivers/infiniband/core/fmr_pool.c
@@ -291,7 +291,7 @@ struct ib_fmr_pool *ib_create_fmr_pool(struct ib_pd             *pd,
 	atomic_set(&pool->flush_ser, 0);
 	init_waitqueue_head(&pool->force_wait);
 
-	pool->thread = kthread_create(ib_fmr_cleanup_thread,
+	pool->thread = kthread_run(ib_fmr_cleanup_thread,
 				      pool,
 				      "ib_fmr(%s)",
 				      device->name);



More information about the general mailing list