]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
sched/nohz: Clean up nohz enter/exit
authorPeter Zijlstra <peterz@infradead.org>
Thu, 21 Dec 2017 14:06:50 +0000 (15:06 +0100)
committerIngo Molnar <mingo@kernel.org>
Fri, 9 Mar 2018 06:59:19 +0000 (07:59 +0100)
commit00357f5ec5d67a52a175da6f29f85c2c19d59bc8
tree53799544850786339539ed2d7f39ff03a1f321b1
parente022e0d38ad475fc650f22efa3deb2fb96e62542
sched/nohz: Clean up nohz enter/exit

The primary observation is that nohz enter/exit is always from the
current CPU, therefore NOHZ_TICK_STOPPED does not in fact need to be
an atomic.

Secondary is that we appear to have 2 nearly identical hooks in the
nohz enter code, set_cpu_sd_state_idle() and
nohz_balance_enter_idle(). Fold the whole set_cpu_sd_state thing into
nohz_balance_{enter,exit}_idle.

Removes an atomic op from both enter and exit paths.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
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>
include/linux/sched/nohz.h
kernel/sched/core.c
kernel/sched/fair.c
kernel/sched/sched.h
kernel/time/tick-sched.c