Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp2359281ybg; Thu, 30 Jul 2020 18:35:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyzJLtgHrfJFUD1Nja4YJ1qFsv8lnmc/ce4XgeDL/5SllgTcWITZvJHEJdA2gj4TJKv2dbm X-Received: by 2002:a17:906:65b:: with SMTP id t27mr1840704ejb.457.1596159319955; Thu, 30 Jul 2020 18:35:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596159319; cv=none; d=google.com; s=arc-20160816; b=uzRQLJzOQc44Wsf1R82kY7GZ1PU7yWINyrI+dRhMnh+nv/vWvXKP8I56ltyJs126mm 0K6VmgBcajT9vjzgOODsWNJAvd3aCQ3m78brl7mgk6qY9mboUqxeDmQ+zBe7D6PxTcBj VaaOa7NBOQ9fAbXZyzfAxYivjpjtuTLN7pcNvhusYcwBOlZ2UDhboETX8rak8StmRw0S eY/d59Cd6TnvNJm8PdSn0VaDeDaTaHMYfcKwKceUYxkiWHo1UyTOGMK3dGnEeJJbmbLV LZE6J2cHarV5NMjB/48EmyRgzPTPU+/bT5F6rWbRWPaiRM5nYpC2OBN6a8E1tKonpCwX E/sQ== 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-transfer-encoding:content-disposition:mime-version :references:reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=K7wAFv0r8I40oOrFxxWxyfwy00220fS1ngxhDXAbBT0=; b=Y2fsC9bxYBQajqK/gbwJohC765ZdBRrywHhbiT1XVvwlY+XDiUZc86VpkoYhcVUO7j qfk49ThCr74zR8KTYwATleEZRRyf6OMulgDfcnOMEYM0TXz37MCTtzsdfQAKaNeKXPQ0 PEHx4pIS74z9eLCieD7O6xXLz2hZES9UorNHpA46jrNIxft9DkfKeLu3MNLBL8jmi5VE 4iSl2PDOUCeFxq11ubId0KDzqAtfWUG+QI10CWwUHq1Yl5fomzdNsnyTw3EM1Kr+li7j hLctu/KwRFbfZKTy9xPCNthH4E00lVCD7o3z8ms2SNSqDDpdSN7CnOY35uBT1ViYJt7C B1Vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=EKf2aA8w; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 7si4594102edh.348.2020.07.30.18.34.55; Thu, 30 Jul 2020 18:35:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=EKf2aA8w; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730905AbgGaBep (ORCPT + 99 others); Thu, 30 Jul 2020 21:34:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:57226 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728080AbgGaBep (ORCPT ); Thu, 30 Jul 2020 21:34:45 -0400 Received: from paulmck-ThinkPad-P72.home (unknown [50.45.173.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 390842076B; Fri, 31 Jul 2020 01:34:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596159284; bh=Ln8RgoD9LBDCVjUQZUfivLSz29Krd2/xbBE+CCZmDHw=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=EKf2aA8wtUVYth+jA4ZL5IJdYbx7I2mgKPCYEU1YiNzRKpZq+yhgZ2t9n4fVePNCS wl5ULXxkkJHyZiqh8gUZbRLU6oZZo88XoIq2i3dqN7+XKG3ytzPHSCErFE9QlvHA1j SOqirVawGbEa17bxyleID8Fqc1nHDAQNuvVy8N3E= Received: by paulmck-ThinkPad-P72.home (Postfix, from userid 1000) id 0A4243521361; Thu, 30 Jul 2020 18:34:44 -0700 (PDT) Date: Thu, 30 Jul 2020 18:34:44 -0700 From: "Paul E. McKenney" To: Joel Fernandes Cc: LKML , Josh Triplett , Lai Jiangshan , Mathieu Desnoyers , Neeraj Upadhyay , rcu , Steven Rostedt Subject: Re: [PATCH 2/2] rcu/tree: Clarify comments about FQS loop reporting quiescent states Message-ID: <20200731013443.GG9247@paulmck-ThinkPad-P72> Reply-To: paulmck@kernel.org References: <20200730030221.705255-1-joel@joelfernandes.org> <20200730030221.705255-2-joel@joelfernandes.org> <20200730163520.GA9247@paulmck-ThinkPad-P72> <20200731012152.GC2336096@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200731012152.GC2336096@google.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 30, 2020 at 09:21:52PM -0400, Joel Fernandes wrote: > On Thu, Jul 30, 2020 at 09:35:20AM -0700, Paul E. McKenney wrote: > > On Wed, Jul 29, 2020 at 11:25:19PM -0400, Joel Fernandes wrote: > > > On Wed, Jul 29, 2020 at 11:02 PM Joel Fernandes (Google) > > > wrote: > > > > > > > > At least since v4.19, the FQS loop no longer reports quiescent states > > > > > > I meant here, "FQS loop no longer reports quiescent states for offline CPUs." > > > > > > Sorry, > > > > You did have me going there for a bit. ;-) > > > > No period (".") at the end though, unless you fix up the following > > to start a new sentence. > > Ok. > > > > > unless it is a dire situation where an offlined CPU failed to report > > > > a quiescent state. Let us clarify the comment in rcu_gp_init() inorder > > > > to keep the comment current. > > > > How about the following for this last sentence? > > > > "This commit therefore fixes the comment in rcu_gp_init() to match > > the current code." > > As per: > https://www.kernel.org/doc/html/v4.17/process/submitting-patches.html > > It says: > Describe your changes in imperative mood, e.g. “make xyzzy do frotz” instead > of “[This patch] makes xyzzy do frotz” or “[I] changed xyzzy to do frotz”, as > if you are giving orders to the codebase to change its behaviour. > > May be I should make it "Fix the comment in rcu_gp_init() to match the > current code"? What submitting-patches.rst is objecting to is starting the commit log with "This patch...". I am suggesting something quite different, namely providing a clear indication of the transition from problem statement to solution. > > > > Signed-off-by: Joel Fernandes (Google) > > > > --- > > > > kernel/rcu/tree.c | 4 ++-- > > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > > > diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c > > > > index 1e51962b565b..929568ff5989 100644 > > > > --- a/kernel/rcu/tree.c > > > > +++ b/kernel/rcu/tree.c > > > > @@ -1701,8 +1701,8 @@ static bool rcu_gp_init(void) > > > > > > > > /* > > > > * Apply per-leaf buffered online and offline operations to the > > > > - * rcu_node tree. Note that this new grace period need not wait > > > > - * for subsequent online CPUs, and that quiescent-state forcing > > > > + * rcu_node tree. Note that this new grace period need not wait for > > > > + * subsequent online CPUs, and that RCU hooks in CPU offlining path > > > > * will handle subsequent offline CPUs. > > > > How about something like this? > > > > ... Note that this new grace period ned not wait for subsequent > > online CPUs, and that RCU hooks in the CPU offlining path, when > > combined with checks in this function, will handle CPUs that > > are currently going offline and that go offline later. > > Sounds good to me. I think s/and that go/or that go/ though. Good point! Another approach would be s/and that/and those that/ but yours works. > I will make these changes and send v3, let me know though if you object. Sounds good! Thanx, Paul > thanks, > > - Joel > > > > Thanx, Paul > > > > > > */ > > > > rcu_state.gp_state = RCU_GP_ONOFF; > > > > -- > > > > 2.28.0.rc0.142.g3c755180ce-goog > > > >