tick/nohz: Only wake up a single target cpu when kicking a task
authorFrederic Weisbecker <frederic@kernel.org>
Wed, 12 May 2021 23:29:20 +0000 (01:29 +0200)
committerIngo Molnar <mingo@kernel.org>
Thu, 13 May 2021 12:21:22 +0000 (14:21 +0200)
commit29721b859217b946bfc001c1644745ed4d7c26cb
tree8aab4cf88fd7900e62215aa2d1f92c6fefed6d8f
parent176b8906c399a170886ea4bad5b24763c6713d61
tick/nohz: Only wake up a single target cpu when kicking a task

When adding a tick dependency to a task, its necessary to
wake up the CPU where the task resides to reevaluate tick
dependencies on that CPU.

However the current code wakes up all nohz_full CPUs, which
is unnecessary.

Switch to waking up a single CPU, by using ordering of writes
to task->cpu and task->tick_dep_mask.

[ mingo: Minor readability edit. ]

Suggested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20210512232924.150322-7-frederic@kernel.org
kernel/time/tick-sched.c