[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210916121048.36623-4-frederic@kernel.org>
Date: Thu, 16 Sep 2021 14:10:47 +0200
From: Frederic Weisbecker <frederic@...nel.org>
To: "Paul E . McKenney" <paulmck@...nel.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
Frederic Weisbecker <frederic@...nel.org>, rcu@...r.kernel.org,
urezki@...il.com, boqun.feng@...il.com,
Neeraj Upadhyay <neeraju@...eaurora.org>,
joel@...lfernandes.org
Subject: [PATCH 3/4] rcu: Move rcu_data.cpu_no_qs.b.exp reset to rcu_export_exp_rdp()
On non-preemptible RCU, move clearing of rcu_data.cpu_no_qs.b.exp to
the actual expedited quiescent state report function, in a similar way
to preemptible RCU dealing with rdp->exp_deferred_qs.
This prepares to remove the exp_deferred_qs field and generalize the use
of cpu_no_qs.b.exp to both preemptible and non-preemptible RCU.
Signed-off-by: Frederic Weisbecker <frederic@...nel.org>
---
kernel/rcu/tree_exp.h | 1 +
kernel/rcu/tree_plugin.h | 6 ++----
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/kernel/rcu/tree_exp.h b/kernel/rcu/tree_exp.h
index 4266610b4587..992f9475d243 100644
--- a/kernel/rcu/tree_exp.h
+++ b/kernel/rcu/tree_exp.h
@@ -256,6 +256,7 @@ static void rcu_report_exp_cpu_mult(struct rcu_node *rnp,
static void rcu_report_exp_rdp(struct rcu_data *rdp)
{
rdp->exp_deferred_qs = false;
+ rdp->cpu_no_qs.b.exp = false;
rcu_report_exp_cpu_mult(rdp->mynode, rdp->grpmask, true);
}
diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
index 4c9aeabec242..b20634fde43d 100644
--- a/kernel/rcu/tree_plugin.h
+++ b/kernel/rcu/tree_plugin.h
@@ -849,10 +849,8 @@ static void rcu_qs(void)
trace_rcu_grace_period(TPS("rcu_sched"),
__this_cpu_read(rcu_data.gp_seq), TPS("cpuqs"));
__this_cpu_write(rcu_data.cpu_no_qs.b.norm, false);
- if (!__this_cpu_read(rcu_data.cpu_no_qs.b.exp))
- return;
- __this_cpu_write(rcu_data.cpu_no_qs.b.exp, false);
- rcu_report_exp_rdp(this_cpu_ptr(&rcu_data));
+ if (__this_cpu_read(rcu_data.cpu_no_qs.b.exp))
+ rcu_report_exp_rdp(this_cpu_ptr(&rcu_data));
}
/*
--
2.25.1
Powered by blists - more mailing lists