Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3f776e8a authored by Anton Blanchard's avatar Anton Blanchard Committed by Roland Dreier
Browse files

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: default avatarRoland Dreier <rolandd@cisco.com>
parent 164ef7a2
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -291,7 +291,7 @@ struct ib_fmr_pool *ib_create_fmr_pool(struct ib_pd *pd,
	atomic_set(&pool->flush_ser, 0);
	atomic_set(&pool->flush_ser, 0);
	init_waitqueue_head(&pool->force_wait);
	init_waitqueue_head(&pool->force_wait);


	pool->thread = kthread_create(ib_fmr_cleanup_thread,
	pool->thread = kthread_run(ib_fmr_cleanup_thread,
				   pool,
				   pool,
				   "ib_fmr(%s)",
				   "ib_fmr(%s)",
				   device->name);
				   device->name);