* + kthread_worker-dont-hog-the-cpu.patch added to -mm tree
@ 2017-08-25 21:55 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2017-08-25 21:55 UTC (permalink / raw)
To: shli, akpm, mingo, oleg, pmladek, tglx, tj, mm-commits
The patch titled
Subject: kernel/kthread.c: kthread_worker: don't hog the cpu
has been added to the -mm tree. Its filename is
kthread_worker-dont-hog-the-cpu.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/kthread_worker-dont-hog-the-cpu.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/kthread_worker-dont-hog-the-cpu.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Shaohua Li <shli@fb.com>
Subject: kernel/kthread.c: kthread_worker: don't hog the cpu
If the worker thread continues getting work, it will hog the cpu and rcu
stall complains. Make it a good citizen. This is triggered in a loop
block device test.
Link: http://lkml.kernel.org/r/5de0a179b3184e1a2183fc503448b0269f24d75b.1503697127.git.shli@fb.com
Signed-off-by: Shaohua Li <shli@fb.com>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tejun Heo <tj@kernel.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
kernel/kthread.c | 1 +
1 file changed, 1 insertion(+)
diff -puN kernel/kthread.c~kthread_worker-dont-hog-the-cpu kernel/kthread.c
--- a/kernel/kthread.c~kthread_worker-dont-hog-the-cpu
+++ a/kernel/kthread.c
@@ -637,6 +637,7 @@ repeat:
schedule();
try_to_freeze();
+ cond_resched();
goto repeat;
}
EXPORT_SYMBOL_GPL(kthread_worker_fn);
_
Patches currently in -mm which might be from shli@fb.com are
kthread_worker-dont-hog-the-cpu.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-08-25 21:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-25 21:55 + kthread_worker-dont-hog-the-cpu.patch added to -mm tree akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.