From: Oleg Nesterov Date: Thu, 11 Jun 2009 12:12:55 +0000 (+0100) Subject: slow_work_thread() should do the exclusive wait X-Git-Tag: firefly_0821_release~13977 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;ds=sidebyside;h=b415c49a864dab8ee90713833d642dd461eccae9;p=firefly-linux-kernel-4.4.55.git slow_work_thread() should do the exclusive wait slow_work_thread() sleeps on slow_work_thread_wq without WQ_FLAG_EXCLUSIVE, this means that slow_work_enqueue()->__wake_up(nr_exclusive => 1) wakes up all kslowd threads. This is not what we want, so we change slow_work_thread() to use prepare_to_wait_exclusive() instead. Signed-off-by: Oleg Nesterov Signed-off-by: David Howells Signed-off-by: Linus Torvalds --- diff --git a/kernel/slow-work.c b/kernel/slow-work.c index b28d19135f43..521ed2004d63 100644 --- a/kernel/slow-work.c +++ b/kernel/slow-work.c @@ -372,8 +372,8 @@ static int slow_work_thread(void *_data) vsmax *= atomic_read(&slow_work_thread_count); vsmax /= 100; - prepare_to_wait(&slow_work_thread_wq, &wait, - TASK_INTERRUPTIBLE); + prepare_to_wait_exclusive(&slow_work_thread_wq, &wait, + TASK_INTERRUPTIBLE); if (!freezing(current) && !slow_work_threads_should_exit && !slow_work_available(vsmax) &&