aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core/fmr_pool.c
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2007-10-30 17:57:43 -0400
committerRoland Dreier <rolandd@cisco.com>2007-10-30 17:57:43 -0400
commit3f776e8a25a9d281125490562e1cc5bd7c14cf7c (patch)
tree6f47d656cf44fe1f38c9b3cf2476c4f209209bec /drivers/infiniband/core/fmr_pool.c
parent164ef7a25285bbc42d8177f454b31631ca4d3ec7 (diff)
IB/fmr_pool: Stop ib_fmr threads from contributing to load average
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: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/core/fmr_pool.c')
-rw-r--r--drivers/infiniband/core/fmr_pool.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/infiniband/core/fmr_pool.c b/drivers/infiniband/core/fmr_pool.c
index d7f64525469b..e8d5f6b64998 100644
--- a/drivers/infiniband/core/fmr_pool.c
+++ b/drivers/infiniband/core/fmr_pool.c
@@ -291,10 +291,10 @@ struct ib_fmr_pool *ib_create_fmr_pool(struct ib_pd *pd,
291 atomic_set(&pool->flush_ser, 0); 291 atomic_set(&pool->flush_ser, 0);
292 init_waitqueue_head(&pool->force_wait); 292 init_waitqueue_head(&pool->force_wait);
293 293
294 pool->thread = kthread_create(ib_fmr_cleanup_thread, 294 pool->thread = kthread_run(ib_fmr_cleanup_thread,
295 pool, 295 pool,
296 "ib_fmr(%s)", 296 "ib_fmr(%s)",
297 device->name); 297 device->name);
298 if (IS_ERR(pool->thread)) { 298 if (IS_ERR(pool->thread)) {
299 printk(KERN_WARNING PFX "couldn't start cleanup thread\n"); 299 printk(KERN_WARNING PFX "couldn't start cleanup thread\n");
300 ret = PTR_ERR(pool->thread); 300 ret = PTR_ERR(pool->thread);