diff options
author | Joel Fernandes (Google) <joel@joelfernandes.org> | 2019-01-19 11:14:18 -0500 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.ibm.com> | 2019-03-26 14:37:49 -0700 |
commit | 671a63517cf983ad8eaa324167165cef245ab744 (patch) | |
tree | 904f4768e7d5b4e3e4ef8f83a8a6df37e5782290 /net/netfilter/xt_IDLETIMER.c | |
parent | e85e6a21b2b5f31148cc3f2e785262b37c3e1ec7 (diff) |
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.
Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com>
Diffstat (limited to 'net/netfilter/xt_IDLETIMER.c')
0 files changed, 0 insertions, 0 deletions