lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220610170018.GG1790663@paulmck-ThinkPad-P17-Gen-1>
Date:   Fri, 10 Jun 2022 10:00:18 -0700
From:   "Paul E. McKenney" <paulmck@...nel.org>
To:     Joel Fernandes <joel@...lfernandes.org>
Cc:     Neeraj Upadhyay <quic_neeraju@...cinc.com>, frederic@...nel.org,
        josh@...htriplett.org, rostedt@...dmis.org,
        mathieu.desnoyers@...icios.com, jiangshanlai@...il.com,
        linux-kernel@...r.kernel.org, boqun.feng@...il.com,
        urezki@...il.com
Subject: Re: [PATCH] rcu/tree: Add comment to describe GP done condition in
 fqs loop

On Fri, Jun 10, 2022 at 04:37:39PM +0000, Joel Fernandes wrote:
> On Thu, Jun 09, 2022 at 12:43:40PM +0530, Neeraj Upadhyay wrote:
> > Add a comment to explain why !rcu_preempt_blocked_readers_cgp() condition
> > is required on root rnp node, for GP completion check in rcu_gp_fqs_loop().
> > 
> > Signed-off-by: Neeraj Upadhyay <quic_neeraju@...cinc.com>
> > ---
> >  kernel/rcu/tree.c | 12 +++++++++++-
> >  1 file changed, 11 insertions(+), 1 deletion(-)
> > 
> > diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
> > index a93c5f4d7e09..9cd1ba512fdc 100644
> > --- a/kernel/rcu/tree.c
> > +++ b/kernel/rcu/tree.c
> > @@ -2083,7 +2083,17 @@ static noinline_for_stack void rcu_gp_fqs_loop(void)
> >  		rcu_gp_torture_wait();
> >  		WRITE_ONCE(rcu_state.gp_state, RCU_GP_DOING_FQS);
> >  		/* Locking provides needed memory barriers. */
> > -		/* If grace period done, leave loop. */
> > +		/*
> > +		 * If grace period done, leave loop. rcu_preempt_blocked_readers_cgp(rnp)
> > +		 * check is required for the case where we only have single node in the
> > +		 * rcu_node tree; so, root rcu node is also the leaf node, where readers
> > +		 * blocking current gp are queued. For multi-node tree, checking ->qsmask
> > +		 * on the root node is sufficient, as root rcu node's ->qsmask is only
> > +		 * cleared, when all leaf rcu nodes have propagated their quiescent
> > +		 * state to their parent node, which happens only after both ->qsmask
> > +		 * and rcu_preempt_blocked_readers_cgp(rnp_leaf) are cleared for those
> > +		 * leaf nodes.
> > +		 */
> >  		if (!READ_ONCE(rnp->qsmask) &&
> >  		    !rcu_preempt_blocked_readers_cgp(rnp))
> >  			break;
> 
> Paul's wording changes are OK with me.
> 
> For the patch:
> Reviewed-by: Joel Fernandes (Google) <joel@...lfernandes.org>

Applied, thank you!

							Thanx, Paul

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ