mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
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 <oleg@redhat.com> Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
6adc74b7d0
commit
b415c49a86
1 changed files with 2 additions and 2 deletions
|
@ -372,8 +372,8 @@ static int slow_work_thread(void *_data)
|
||||||
vsmax *= atomic_read(&slow_work_thread_count);
|
vsmax *= atomic_read(&slow_work_thread_count);
|
||||||
vsmax /= 100;
|
vsmax /= 100;
|
||||||
|
|
||||||
prepare_to_wait(&slow_work_thread_wq, &wait,
|
prepare_to_wait_exclusive(&slow_work_thread_wq, &wait,
|
||||||
TASK_INTERRUPTIBLE);
|
TASK_INTERRUPTIBLE);
|
||||||
if (!freezing(current) &&
|
if (!freezing(current) &&
|
||||||
!slow_work_threads_should_exit &&
|
!slow_work_threads_should_exit &&
|
||||||
!slow_work_available(vsmax) &&
|
!slow_work_available(vsmax) &&
|
||||||
|
|
Loading…
Reference in a new issue