summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeeraj Upadhyay <neeraju@codeaurora.org>2021-08-18 11:04:00 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-11-17 11:48:33 +0300
commit6a93d8ebb8aa1b3ed14e646aa063b28dfb3b8784 (patch)
treea25e905683f2a1bb080d662bc1539c542cbb2c41
parent6237a1685c28c93b6477db46fbf67b7f0a0139e6 (diff)
downloadlinux-6a93d8ebb8aa1b3ed14e646aa063b28dfb3b8784.tar.xz
rcu: Fix existing exp request check in sync_sched_exp_online_cleanup()
[ Upstream commit f0b2b2df5423fb369ac762c77900bc7765496d58 ] The sync_sched_exp_online_cleanup() checks to see if RCU needs an expedited quiescent state from the incoming CPU, sending it an IPI if so. Before sending IPI, it checks whether expedited qs need has been already requested for the incoming CPU, by checking rcu_data.cpu_no_qs.b.exp for the current cpu, on which sync_sched_exp_online_cleanup() is running. This works for the case where incoming CPU is same as self. However, for the case where incoming CPU is different from self, expedited request won't get marked, which can potentially delay reporting of expedited quiescent state for the incoming CPU. Fixes: e015a3411220 ("rcu: Avoid self-IPI in sync_sched_exp_online_cleanup()") Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org> Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--kernel/rcu/tree_exp.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/rcu/tree_exp.h b/kernel/rcu/tree_exp.h
index df90d4d7ad2e..4c4d7683a4e5 100644
--- a/kernel/rcu/tree_exp.h
+++ b/kernel/rcu/tree_exp.h
@@ -738,7 +738,7 @@ static void sync_sched_exp_online_cleanup(int cpu)
my_cpu = get_cpu();
/* Quiescent state either not needed or already requested, leave. */
if (!(READ_ONCE(rnp->expmask) & rdp->grpmask) ||
- __this_cpu_read(rcu_data.cpu_no_qs.b.exp)) {
+ rdp->cpu_no_qs.b.exp) {
put_cpu();
return;
}