2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-22 12:14:01 +08:00

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>
This commit is contained in:
Anton Blanchard 2007-10-30 14:57:43 -07:00 committed by Roland Dreier
parent 164ef7a252
commit 3f776e8a25

View File

@ -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);