rcu.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rcu: Only trace when cbs are accelerated
@ 2021-01-11 11:45 Neeraj Upadhyay
  2021-01-11 17:34 ` Steven Rostedt
  0 siblings, 1 reply; 2+ messages in thread
From: Neeraj Upadhyay @ 2021-01-11 11:45 UTC (permalink / raw)
  To: paulmck, josh, rostedt, mathieu.desnoyers, jiangshanlai, joel
  Cc: rcu, linux-kernel, Neeraj Upadhyay

Fix rcu_accelerate_cbs() traces to only trace when cbs are
accelerated in current call.

Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
---
 kernel/rcu/tree.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index 804e543..338b817 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -1508,8 +1508,9 @@ static bool rcu_accelerate_cbs(struct rcu_node *rnp, struct rcu_data *rdp)
 	 * number.
 	 */
 	gp_seq_req = rcu_seq_snap(&rcu_state.gp_seq);
-	if (rcu_segcblist_accelerate(&rdp->cblist, gp_seq_req))
-		ret = rcu_start_this_gp(rnp, rdp, gp_seq_req);
+	if (!rcu_segcblist_accelerate(&rdp->cblist, gp_seq_req))
+		return ret;
+	ret = rcu_start_this_gp(rnp, rdp, gp_seq_req);
 
 	/* Trace depending on how much we were able to accelerate. */
 	if (rcu_segcblist_restempty(&rdp->cblist, RCU_WAIT_TAIL))
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] rcu: Only trace when cbs are accelerated
  2021-01-11 11:45 [PATCH] rcu: Only trace when cbs are accelerated Neeraj Upadhyay
@ 2021-01-11 17:34 ` Steven Rostedt
  0 siblings, 0 replies; 2+ messages in thread
From: Steven Rostedt @ 2021-01-11 17:34 UTC (permalink / raw)
  To: Neeraj Upadhyay
  Cc: paulmck, josh, mathieu.desnoyers, jiangshanlai, joel, rcu, linux-kernel

On Mon, 11 Jan 2021 17:15:01 +0530
Neeraj Upadhyay <neeraju@codeaurora.org> wrote:

> Fix rcu_accelerate_cbs() traces to only trace when cbs are
> accelerated in current call.

The body of the commit should explain "why" not "what". Why not trace the
cbs when not accelerated in the current call?

-- Steve


> 
> Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-11 17:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-11 11:45 [PATCH] rcu: Only trace when cbs are accelerated Neeraj Upadhyay
2021-01-11 17:34 ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).