Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp5016010imm; Mon, 14 May 2018 17:57:38 -0700 (PDT) X-Google-Smtp-Source: AB8JxZo99U7TvCc7/u/cWu1RntT7QwoFUhDtjcOaUWpK7SWfNSScW2iUavr3GYVStyHre9hLLmha X-Received: by 2002:a17:902:145:: with SMTP id 63-v6mr12112026plb.332.1526345858759; Mon, 14 May 2018 17:57:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526345858; cv=none; d=google.com; s=arc-20160816; b=Kk0BjtvaoQmFuNC8MlNd9EwgJ3HfauxOQUKgZuLHnOmMNGlxNjBQb4RSrbxwl9yACd BR/aArzdgksmVluHPq75n1f8cuypqTwN5rEYPWGi9nMicb6r+Li0VqgQoZ8QQvi3MDDF eAgXPsB/DoO4ZYVCktybxjOPAgcpUSwKCgLgro4Lj+iYqV0yavmOTHmpiJ+sReQw+62o inN0A3MyrXO7o37BgmHR7kTBjtfbOMGkxHY4T76Mwi+NOXdBDqTsyXq3PYaZq3pYFWgj jF7fdB0nrqVun17TTxCzrHlI5C5sRBP4BEOGaVTHxFLPz8bTVloSa41vQSti6mB2Q/G8 EjLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=pti+AdAFCmQcZSg9eOjGC7EOQnrXedVgt7SDkK6kCcg=; b=Wfre0QsUltrB6FfFKEVnv0kINVCFpazjSGd7pNK31LLHiOKXth8YyyS+pRsaNa+gHJ FwWw5+WVX9F1BSfZJJU1zjNwW17WVWAdd8CHxjEaS6Es0fzdN8vrN2JoUGlVAdJIKUA0 sQvoLdTu/MbN5a9i6VCTMRjS6Ei2MSJzbuJ7nyIfM7B2lcQEF2ElkpFIuDynuenDW4UD k3wxMfEc6wws+xcwORqIyP9lLTAvTfnkJYRxYhtdsDpgyDCPPcfEtMRPZ7ExgHYdj1Z5 +155SAeI4ptPHlCgMcUviftXmXR9RrSbNrP+3Yy4D+4pibxekQxJjHBuu5JhN6RVihQp A6+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes-org.20150623.gappssmtp.com header.s=20150623 header.b=U84TEKIn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e1-v6si8514764pgr.167.2018.05.14.17.57.24; Mon, 14 May 2018 17:57:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@joelfernandes-org.20150623.gappssmtp.com header.s=20150623 header.b=U84TEKIn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752391AbeEOA5M (ORCPT + 99 others); Mon, 14 May 2018 20:57:12 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:33187 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752024AbeEOA5L (ORCPT ); Mon, 14 May 2018 20:57:11 -0400 Received: by mail-pf0-f195.google.com with SMTP id a20-v6so2883893pfo.0 for ; Mon, 14 May 2018 17:57:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=pti+AdAFCmQcZSg9eOjGC7EOQnrXedVgt7SDkK6kCcg=; b=U84TEKInH+yUxufqAEKhbwxr4MKE5FClUKYpdViFPNhWDc1PYT9eyl68Q1KHyuUsCw N1EYBvMXNW/8pYbObKkNB4NMl9XbSmE0NxVeRkFoNYsGVsUeX/Mx6d+RqZkNNhnSCCJw HgVZgWfCqTBkMlmlbsfZIqhQlRr9PS3RZb9KDmgJqcoqbo5UQ0B/h7thJjuTrigP2pEQ kmtfj9+CrZ8qY8ltqKO0eCkG34yuzpeoFRgr/dn8WAl/kwsz2jNwUH411cV6C7ix4bQr aGAtonjfBK7x/kBazKoL7SiOZ2rwRFBDS8hJmWpjil8Hj0ZUbcjb4lKgEECJU68229s/ VOrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=pti+AdAFCmQcZSg9eOjGC7EOQnrXedVgt7SDkK6kCcg=; b=onsuT6cSsYsv9cJBcxYbjvzG6bsvMFq/qnT+oMyVYMM6rfcvNTOTf5ou4FBXoFuwpk 75b8J1dpCjDfOHhRer5zBwwISwgXNRaN/bUyb2fpNlisqvZBo7tYWjJMQpZxwIThHo2R Pbd48Y/iUomgzVRXlS3WinczMnzL7iAmiSMsP0iPa61SKSm/xp45/Y0HxJ4g++Amaw5I +mBRjcZkT2VUKD3+dMrjXFCB3vl85YPu1TSi6xhwQUrwc/4VVZpcSOJi23Zj3Oo0wpTb MiaIfdAl3Yge7LntCLh7y1l7+M+f+X7/WIjnwvoTdht4Uph4V7Su+pLP16MglSciOOz6 5QCw== X-Gm-Message-State: ALKqPwcClqyCVQA7oRYHwwTFuLM2JPSjeVvA1ndRdr0HKFmBmsk7KQ2N +n9xMykXTtKMpKYajD8UzKKRqw== X-Received: by 2002:a63:b647:: with SMTP id v7-v6mr7881047pgt.181.1526345830496; Mon, 14 May 2018 17:57:10 -0700 (PDT) Received: from localhost ([2620:0:1000:1600:3122:ea9c:d178:eb]) by smtp.gmail.com with ESMTPSA id y2-v6sm14702910pgp.92.2018.05.14.17.57.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 14 May 2018 17:57:10 -0700 (PDT) Date: Mon, 14 May 2018 17:57:09 -0700 From: Joel Fernandes To: "Paul E. McKenney" Cc: linux-kernel@vger.kernel.org, Josh Triplett , Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , byungchul.park@lge.com, kernel-team@android.com Subject: Re: [PATCH RFC 6/8] rcu: Add back the Startedleaf tracepoint Message-ID: <20180515005709.GE209519@joelaf.mtv.corp.google.com> References: <20180514031541.67247-1-joel@joelfernandes.org> <20180514031541.67247-7-joel@joelfernandes.org> <20180514183823.GF26088@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180514183823.GF26088@linux.vnet.ibm.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 14, 2018 at 11:38:23AM -0700, Paul E. McKenney wrote: > On Sun, May 13, 2018 at 08:15:39PM -0700, Joel Fernandes (Google) wrote: > > In recent discussion [1], the check for whether a leaf believes RCU is > > not idle, is being added back to funnel locking code, to avoid more > > locking. In this we are marking the leaf node for a future grace-period > > and bailing out since a GP is currently in progress. However the > > tracepoint is missing. Lets add it back. > > > > Also add a small comment about why we do this check (basically the point > > is to avoid locking intermediate nodes unnecessarily) and clarify the > > comments in the trace event header now that we are doing traversal of > > one or more intermediate nodes. > > > > [1] http://lkml.kernel.org/r/20180513190906.GL26088@linux.vnet.ibm.com > > > > Signed-off-by: Joel Fernandes (Google) > > Looks like a good idea, but it does not apply -- which is not a surprise, > given the change rate in this code. I hand-applied as a modification > to c1b3f9fce26f ("rcu: Don't funnel-lock above leaf node if GP in progress") > with attribution, but with the changes below. Please let me know if I > am missing something. > > Ah, I see -- this commit depends on your earlier name-change commit. > I therefore made this patch use the old names. Ok, I'll check your new tree and rebase. > > --- > > include/trace/events/rcu.h | 4 ++-- > > kernel/rcu/tree.c | 11 ++++++++++- > > 2 files changed, 12 insertions(+), 3 deletions(-) > > > > diff --git a/include/trace/events/rcu.h b/include/trace/events/rcu.h > > index 539900a9f8c7..dc0bd11739c7 100644 > > --- a/include/trace/events/rcu.h > > +++ b/include/trace/events/rcu.h > > @@ -91,8 +91,8 @@ TRACE_EVENT(rcu_grace_period, > > * > > * "Startleaf": Request a grace period based on leaf-node data. > > * "Prestarted": Someone beat us to the request > > - * "Startedleaf": Leaf-node start proved sufficient. > > - * "Startedleafroot": Leaf-node start proved sufficient after checking root. > > + * "Startedleaf": Leaf and one or more non-root nodes marked for future start. > > Actually, we only get to that trace if all we did was mark the leaf > node, right? I didn't think so. In the code we are doing the check for rnp every time we walk up the tree. So even when we are on an intermediate node, we do the check of the node we started with. I thought that's what you wanted to do. It makes sense to me to do so too. > > + * "Startedleafroot": all non-root nodes from leaf to root marked for future start. > > I got rid of the "non-root" part, given that we had to have marked > the root to break out of the loop. Ah yes, sorry. That's absolutely true. thanks, - Joel