Patch "sched/nohz: Fix affine unpinned timers mess" has been added to the 4.4-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
sched/nohz: Fix affine unpinned timers mess
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
sched-nohz-fix-affine-unpinned-timers-mess.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
444969223c81c7d0a95136b7b4cfdcfbc96ac5bdMon Sep 17 00:00:00 2001
From: Wanpeng Li <[email protected]>
Date: Wed, 4 May 2016 14:45:34 +0800
Subject: sched/nohz: Fix affine unpinned timers mess
From: Wanpeng Li <[email protected]>
commit 444969223c81c7d0a95136b7b4cfdcfbc96ac5bd upstream.
The following commit:
9642d18eee2c ("nohz: Affine unpinned timers to housekeepers")'
intended to affine unpinned timers to housekeepers:
unpinned timers(full dynaticks, idle) => nearest busy housekeepers(otherwise, fallback to any housekeepers) unpinned timers(full dynaticks, busy) => nearest busy housekeepers(otherwise, fallback to any housekeepers) unpinned timers(houserkeepers, idle) => nearest busy housekeepers(otherwise, fallback to itself)
However, the !idle_cpu(i) && is_housekeeping_cpu(cpu) check modified the intention to:
unpinned timers(full dynaticks, idle) => any housekeepers(no mattter cpu topology) unpinned timers(full dynaticks, busy) => any housekeepers(no mattter cpu topology) unpinned timers(housekeepers, idle) => any busy cpus(otherwise, fallback to any housekeepers)
This patch fixes it by checking if there are busy housekeepers nearby, otherwise falls to any housekeepers/itself. After the patch:
unpinned timers(full dynaticks, idle) => nearest busy housekeepers(otherwise, fallback to any housekeepers) unpinned timers(full dynaticks, busy) => nearest busy housekeepers(otherwise, fallback to any housekeepers) unpinned timers(housekeepers, idle) => nearest busy housekeepers(otherwise, fallback to itself)
--- kernel/sched/core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
kernel/sched/core.c +4 -1
@@ -627,7 +627,10 @@ int get_nohz_timer_target(void)rcu_read_lock ();for_each_domain (cpu, sd) {for_each_cpu (i,sched_domain_span (sd)) { -if (!idle_cpu (i) &&is_housekeeping_cpu (cpu)) { +if (cpu == i) +continue ; + +if (!idle_cpu (i) &&is_housekeeping_cpu (i)) { cpu = i; goto unlock; }
Patches currently in stable-queue which might be from [email protected] are
queue-4.4/sched-nohz-fix-affine-unpinned-timers-mess.patch queue-4.4/sched-cputime-fix-no_hz_full-getrusage-monotonicity-regression.patch