linux/kernel/rcu
Frederic Weisbecker 9715ed501b rcu/tasks: Handle new PF_IDLE semantics
The commit:

	cff9b2332a ("kernel/sched: Modify initial boot task idle setup")

has changed the semantics of what is to be considered an idle task in
such a way that CPU boot code preceding the actual idle loop is excluded
from it.

This has however introduced new potential RCU-tasks stalls when either:

1) Grace period is started before init/0 had a chance to set PF_IDLE,
   keeping it stuck in the holdout list until idle ever schedules.

2) Grace period is started when some possible CPUs have never been
   online, keeping their idle tasks stuck in the holdout list until the
   CPU ever boots up.

3) Similar to 1) but with secondary CPUs: Grace period is started
   concurrently with secondary CPU booting, putting its idle task in
   the holdout list because PF_IDLE isn't yet observed on it. It stays
   then stuck in the holdout list until that CPU ever schedules. The
   effect is mitigated here by the hotplug AP thread that must run to
   bring the CPU up.

Fix this with handling the new semantics of PF_IDLE, keeping in mind
that it may or may not be set on an idle task. Take advantage of that to
strengthen the coverage of an RCU-tasks quiescent state within an idle
task, excluding the CPU boot code from it. Only the code running within
the idle loop is now a quiescent state, along with offline CPUs.

Fixes: cff9b2332a ("kernel/sched: Modify initial boot task idle setup")
Suggested-by: Joel Fernandes <joel@joelfernandes.org>
Suggested-by: Paul E . McKenney" <paulmck@kernel.org>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
2023-11-01 22:03:56 +01:00
..
Kconfig rcu: Employ jiffies-based backstop to callback time limit 2023-05-11 13:42:39 -07:00
Kconfig.debug rcu: Allow up to five minutes expedited RCU CPU stall-warning timeouts 2023-01-09 12:09:52 -08:00
Makefile rcuperf: Change rcuperf to rcuscale 2020-08-24 18:39:24 -07:00
rcu_segcblist.c rcu: Use rcu_segcblist_segempty() instead of open coding it 2023-10-04 17:33:18 +02:00
rcu_segcblist.h rcu: Throttle callback invocation based on number of ready callbacks 2023-01-03 17:28:34 -08:00
rcu.h rcu: Introduce rcu_cpu_online() 2023-11-01 22:03:27 +01:00
rcuscale.c rcuscale: Move rcu_scale_writer() schedule_timeout_uninterruptible() to _idle() 2023-07-14 15:01:49 -07:00
rcutorture.c Merge branches 'rcu/torture', 'rcu/fixes', 'rcu/docs', 'rcu/refscale', 'rcu/tasks' and 'rcu/stall' into rcu/next 2023-10-23 15:24:11 +02:00
refscale.c refscale: Print out additional module parameters 2023-09-11 23:02:18 +02:00
srcutiny.c rcu: Dump memory object info if callback function is invalid 2023-09-13 22:29:12 +02:00
srcutree.c srcu: Only accelerate on enqueue time 2023-10-13 14:00:54 +02:00
sync.c rcu/sync: Use call_rcu_hurry() instead of call_rcu 2022-11-29 14:04:33 -08:00
tasks.h rcu/tasks: Handle new PF_IDLE semantics 2023-11-01 22:03:56 +01:00
tiny.c rcu: Dump memory object info if callback function is invalid 2023-09-13 22:29:12 +02:00
tree_exp.h rcu: Add RCU CPU stall notifier 2023-09-11 22:10:47 +02:00
tree_nocb.h rcu: Make the rcu_nocb_poll boot parameter usable via boot config 2023-08-16 14:27:41 -07:00
tree_plugin.h rcu: Mark additional concurrent load from ->cpu_no_qs.b.exp 2023-05-11 13:42:39 -07:00
tree_stall.h rcu/tree: Defer setting of jiffies during stall reset 2023-09-11 22:36:40 +02:00
tree.c rcu: Introduce rcu_cpu_online() 2023-11-01 22:03:27 +01:00
tree.h rcu/tree: Defer setting of jiffies during stall reset 2023-09-11 22:36:40 +02:00
update.c torture: Move rcutorture_sched_setaffinity() out of rcutorture 2023-09-24 17:24:01 +02:00