summaryrefslogtreecommitdiffstats
path: root/kernel/sched/core.c
diff options
context:
space:
mode:
authorPeter Zijlstra2017-12-21 10:11:09 +0100
committerIngo Molnar2018-03-09 07:59:16 +0100
commitb7031a02ec753bf9b52a94a966b05e1abad3b7a9 (patch)
tree0a5d1d9105bce0a900850e6704e808d345751668 /kernel/sched/core.c
parentsched/core: Convert nohz_flags to atomic_t (diff)
downloadkernel-qcow2-linux-b7031a02ec753bf9b52a94a966b05e1abad3b7a9.tar.gz
kernel-qcow2-linux-b7031a02ec753bf9b52a94a966b05e1abad3b7a9.tar.xz
kernel-qcow2-linux-b7031a02ec753bf9b52a94a966b05e1abad3b7a9.zip
sched/fair: Add NOHZ_STATS_KICK
Split the NOHZ idle balancer into doing two separate actions: - update blocked load statistic - actually load-balance Since the latter requires the former, ensure this happens. For now always tag both bits at the same time. Prepares for a future where we can toggle only the STATS bit. Suggested-by: Vincent Guittot <vincent.guittot@linaro.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/sched/core.c')
-rw-r--r--kernel/sched/core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 96ad1c003d74..69c9a6b07b61 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -583,7 +583,7 @@ static inline bool got_nohz_idle_kick(void)
{
int cpu = smp_processor_id();
- if (!(atomic_read(nohz_flags(cpu)) & NOHZ_BALANCE_KICK))
+ if (!(atomic_read(nohz_flags(cpu)) & NOHZ_KICK_MASK))
return false;
if (idle_cpu(cpu) && !need_resched())
@@ -593,7 +593,7 @@ static inline bool got_nohz_idle_kick(void)
* We can't run Idle Load Balance on this CPU for this time so we
* cancel it and clear NOHZ_BALANCE_KICK
*/
- atomic_andnot(NOHZ_BALANCE_KICK, nohz_flags(cpu));
+ atomic_andnot(NOHZ_KICK_MASK, nohz_flags(cpu));
return false;
}