linux-stable/kernel/rcu
Zqiang e2bb1288a3 rcu: Cleanup RCU urgency state for offline CPU
When a CPU is slow to provide a quiescent state for a given grace
period, RCU takes steps to encourage that CPU to get with the
quiescent-state program in a more timely fashion.  These steps
include these flags in the rcu_data structure:

1.	->rcu_urgent_qs, which causes the scheduling-clock interrupt to
	request an otherwise pointless context switch from the scheduler.

2.	->rcu_need_heavy_qs, which causes both cond_resched() and RCU's
	context-switch hook to do an immediate momentary quiscent state.

3.	->rcu_need_heavy_qs, which causes the scheduler-clock tick to
	be enabled even on nohz_full CPUs with only one runnable task.

These flags are of course cleared once the corresponding CPU has passed
through a quiescent state.  Unless that quiescent state is the CPU
going offline, which means that when the CPU comes back online, it will
needlessly consume additional CPU time and incur additional latency,
which constitutes a minor but very real performance bug.

This commit therefore adds the call to rcu_disable_urgency_upon_qs()
that clears these flags to the CPU-hotplug offlining code path.

Signed-off-by: Zqiang <qiang1.zhang@intel.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Reviewed-by: Neeraj Upadhyay <quic_neeraju@quicinc.com>
2022-07-19 11:40:00 -07:00
..
Kconfig Merge branch 'exp.2022.05.11a' into HEAD 2022-05-11 11:49:35 -07:00
Kconfig.debug rcu: Forbid RCU_STRICT_GRACE_PERIOD in TINY_RCU kernels 2022-07-19 11:39:59 -07:00
Makefile rcuperf: Change rcuperf to rcuscale 2020-08-24 18:39:24 -07:00
rcu.h sysctl changes for v5.19-rc1 2022-05-26 16:57:20 -07:00
rcu_segcblist.c rcu: Clarify fill-the-gap comment in rcu_segcblist_advance() 2022-04-11 17:28:48 -07:00
rcu_segcblist.h rcu: Mark writes to the rcu_segcblist structure's ->flags field 2022-02-14 10:36:58 -08:00
rcuscale.c rcuscale: Allow rcuscale without RCU Tasks Rude/Trace 2022-04-20 16:53:19 -07:00
rcutorture.c Merge branches 'docs.2022.04.20a', 'fixes.2022.04.20a', 'nocb.2022.04.11b', 'rcu-tasks.2022.04.11b', 'srcu.2022.05.03a', 'torture.2022.04.11b', 'torture-tasks.2022.04.20a' and 'torturescript.2022.04.20a' into HEAD 2022-05-03 10:21:40 -07:00
refscale.c refscale: Allow refscale without RCU Tasks Rude/Trace 2022-04-20 16:53:19 -07:00
srcutiny.c srcu: Prevent redundant __srcu_read_unlock() wakeup 2021-11-30 17:28:16 -08:00
srcutree.c srcu: Make expedited RCU grace periods block even less frequently 2022-07-19 11:39:59 -07:00
sync.c rcu_sync: Fix comment to properly reflect rcu_sync_exit() behavior 2022-04-20 16:51:11 -07:00
tasks.h rcu-tasks: Handle sparse cpu_possible_mask in rcu_tasks_invoke_cbs() 2022-04-11 17:06:43 -07:00
tiny.c rcu: tiny: Record kvfree_call_rcu() call stack for KASAN 2022-07-19 11:40:00 -07:00
tree.c rcu: Cleanup RCU urgency state for offline CPU 2022-07-19 11:40:00 -07:00
tree.h Merge branch 'exp.2022.05.11a' into HEAD 2022-05-11 11:49:35 -07:00
tree_exp.h rcu: Move expedited grace period (GP) work to RT kthread_worker 2022-05-11 11:47:10 -07:00
tree_nocb.h rcu/nocb: Initialize nocb kthreads only for boot CPU prior SMP initialization 2022-04-11 17:05:58 -07:00
tree_plugin.h rcu: Immediately boost preempted readers for strict grace periods 2022-07-19 11:39:59 -07:00
tree_stall.h printk changes for 5.19 2022-05-25 10:32:08 -07:00
update.c rcu: Introduce CONFIG_RCU_EXP_CPU_STALL_TIMEOUT 2022-05-11 11:38:50 -07:00