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] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180523160640.GN3803@linux.vnet.ibm.com>
Date:   Wed, 23 May 2018 09:06:40 -0700
From:   "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:     Joel Fernandes <joelaf@...gle.com>
Cc:     linux-kernel@...r.kernel.org,
        "Joel Fernandes (Google)" <joel@...lfernandes.org>,
        Boqun Feng <boqun.feng@...il.com>, byungchul.park@....com,
        Ingo Molnar <mingo@...hat.com>,
        Josh Triplett <josh@...htriplett.org>, kernel-team@...roid.com,
        Lai Jiangshan <jiangshanlai@...il.com>,
        Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
        Peter Zilstra <peterz@...radead.org>,
        Steven Rostedt <rostedt@...dmis.org>
Subject: Re: [PATCH 4/4] rcu: Identify grace period is in progress as we
 advance up the tree

On Tue, May 22, 2018 at 11:38:15PM -0700, Joel Fernandes wrote:
> From: "Joel Fernandes (Google)" <joel@...lfernandes.org>
> 
> There's no need to keep checking the same starting node for whether a
> grace period is in progress as we advance up the funnel lock loop. Its
> sufficient if we just checked it in the start, and then subsequently
> checked the internal nodes as we advanced up the combining tree. This
> also makes sense because the grace-period updates propogate from the
> root to the leaf, so there's a chance we may find a grace period has
> started as we advance up, lets check for the same.
> 
> Reported-by: Paul McKenney <paulmck@...ux.vnet.ibm.com>
> Signed-off-by: Joel Fernandes (Google) <joel@...lfernandes.org>

Looks good, queued for further review and testing, thank you!

							Thanx, Paul

> ---
>  kernel/rcu/tree.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
> index 31f4b4b7d824..65e49282429c 100644
> --- a/kernel/rcu/tree.c
> +++ b/kernel/rcu/tree.c
> @@ -1570,11 +1570,12 @@ static bool rcu_start_this_gp(struct rcu_node *rnp_start, struct rcu_data *rdp,
>  			goto unlock_out;
>  		}
>  		rnp->gp_seq_needed = gp_seq_req;
> -		if (rcu_seq_state(rcu_seq_current(&rnp_start->gp_seq))) {
> +		if (rcu_seq_state(rcu_seq_current(&rnp->gp_seq))) {
>  			/*
> -			 * We just marked the leaf, and a grace period
> -			 * is in progress, which means that rcu_gp_cleanup()
> -			 * will see the marking.  Bail to reduce contention.
> +			 * We just marked the leaf or internal node, and a
> +			 * grace period is in progress, which means that
> +			 * rcu_gp_cleanup() will see the marking.  Bail to
> +			 * reduce contention.
>  			 */
>  			trace_rcu_this_gp(rnp_start, rdp, gp_seq_req,
>  					  TPS("Startedleaf"));
> -- 
> 2.17.0.441.gb46fe60e1d-goog
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ