kernel_samsung_a53x/kernel/rcu
Joel Fernandes (Google) 323a4009a4 rcu: Avoid unnecessary softirq when system is idle
When there are no callbacks pending on an idle system, I noticed that
RCU softirq is continuously firing. During this the cpu_no_qs is set to
false, and core_needs_qs is set to true indefinitely. This causes
rcu_process_callbacks to be repeatedly called, even though the node
corresponding to the CPU has that CPU's mask bit cleared and the system
is idle. I believe the race is when such mask clearing is done during
idle CPU scan of the quiescent state forcing stage in the kthread
instead of the softirq. Since the rnp mask is cleared, but the flags on
the CPU's rdp are not cleared, the CPU thinks it still needs to report
to core RCU.

Cure this by clearing the core_needs_qs flag when the CPU detects that
its node is already updated which will avoid the unwanted softirq raises
to the benefit of real-time systems.

Test: Ran rcutorture for various tree RCU configs.

Change-Id: Iee374d1dcdc74ecc5e6816a99be51feddd876931
Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com>
Signed-off-by: mydongistiny <jaysonedson@gmail.com>
2024-11-19 17:34:20 +01:00
..
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig.debug Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rcu.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rcu_segcblist.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rcu_segcblist.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rcuscale.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rcutorture.c rcutorture: Fix invalid context warning when enable srcu barrier testing 2024-11-19 14:19:06 +01:00
refscale.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
srcutiny.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
srcutree.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sync.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tasks.h rcu-tasks: Provide rcu_trace_implies_rcu_gp() 2024-11-19 08:44:22 +01:00
tiny.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tree.c rcu: Avoid unnecessary softirq when system is idle 2024-11-19 17:34:20 +01:00
tree.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tree_exp.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tree_plugin.h rcu_boost: always without delay 2024-11-17 17:37:56 +01:00
tree_stall.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
update.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00