RCU Archive on lore.kernel.org
 help / color / 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	[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, back to index

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

RCU Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/rcu/0 rcu/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 rcu rcu/ https://lore.kernel.org/rcu \
		rcu@vger.kernel.org
	public-inbox-index rcu

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.rcu


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git