]> git.baikalelectronics.ru Git - kernel.git/commit
nohz: Add TICK_DEP_BIT_RCU
authorFrederic Weisbecker <frederic@kernel.org>
Wed, 24 Jul 2019 13:22:59 +0000 (15:22 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 May 2023 09:35:57 +0000 (11:35 +0200)
commitf3799193159085d273123aaedcda1c1b524f8e90
tree9c1ea7db1ab960aa9594b458b9bc8161c25627ca
parent00602d42b30c1ca82d0b6450115c4a0a8173220d
nohz: Add TICK_DEP_BIT_RCU

[ Upstream commit c80c55c07db27167930d7fd1fd8298b2893633da ]

If a nohz_full CPU is looping in the kernel, the scheduling-clock tick
might nevertheless remain disabled.  In !PREEMPT kernels, this can
prevent RCU's attempts to enlist the aid of that CPU's executions of
cond_resched(), which can in turn result in an arbitrarily delayed grace
period and thus an OOM.  RCU therefore needs a way to enable a holdout
nohz_full CPU's scheduler-clock interrupt.

This commit therefore provides a new TICK_DEP_BIT_RCU value which RCU can
pass to tick_dep_set_cpu() and friends to force on the scheduler-clock
interrupt for a specified CPU or task.  In some cases, rcutorture needs
to turn on the scheduler-clock tick, so this commit also exports the
relevant symbols to GPL-licensed modules.

Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Stable-dep-of: 58d766824264 ("tick/nohz: Fix cpu_is_hotpluggable() by checking with nohz subsystem")
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/linux/tick.h
include/trace/events/timer.h
kernel/time/tick-sched.c