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: <Zjt2UOBu57DUWi3_@localhost.localdomain>
Date: Wed, 8 May 2024 14:55:44 +0200
From: Frederic Weisbecker <frederic@...nel.org>
To: Valentin Schneider <vschneid@...hat.com>
Cc: rcu@...r.kernel.org, linux-kernel@...r.kernel.org,
	"Paul E. McKenney" <paulmck@...nel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Neeraj Upadhyay <quic_neeraju@...cinc.com>,
	Joel Fernandes <joel@...lfernandes.org>,
	Josh Triplett <josh@...htriplett.org>,
	Boqun Feng <boqun.feng@...il.com>,
	Steven Rostedt <rostedt@...dmis.org>,
	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
	Lai Jiangshan <jiangshanlai@...il.com>,
	Zqiang <qiang.zhang1211@...il.com>
Subject: Re: [PATCH v2 20/27] rcu: Rename struct rcu_data .dynticks_snap into
 .watching_snap

Le Tue, Apr 30, 2024 at 11:17:24AM +0200, Valentin Schneider a écrit :
> The context_tracking.state RCU_DYNTICKS subvariable has been renamed to
> RCU_WATCHING, and the snapshot helpers are now prefix by
> "rcu_watching". Reflect that change into the storage variables for these
> snapshots.
> 
> Signed-off-by: Valentin Schneider <vschneid@...hat.com>
> ---
>  .../RCU/Design/Data-Structures/Data-Structures.rst          | 4 ++--
>  kernel/rcu/tree.c                                           | 6 +++---
>  kernel/rcu/tree.h                                           | 2 +-
>  3 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/Documentation/RCU/Design/Data-Structures/Data-Structures.rst b/Documentation/RCU/Design/Data-Structures/Data-Structures.rst
> index 5389cc49bea13..de76c624fe93e 100644
> --- a/Documentation/RCU/Design/Data-Structures/Data-Structures.rst
> +++ b/Documentation/RCU/Design/Data-Structures/Data-Structures.rst
> @@ -921,10 +921,10 @@ This portion of the ``rcu_data`` structure is declared as follows:
>  
>  ::
>  
> -     1   int dynticks_snap;
> +     1   int watching_snap;
>       2   unsigned long dynticks_fqs;
>  
> -The ``->dynticks_snap`` field is used to take a snapshot of the
> +The ``->watching_snap`` field is used to take a snapshot of the
>  corresponding CPU's dyntick-idle state when forcing quiescent states,

Not sure if it's handled in forecoming patches but:

s/dyntick-idle/watching

>  and is therefore accessed from other CPUs. Finally, the
>  ``->dynticks_fqs`` field is used to count the number of times this CPU

Looks like this one is a leftover...

> diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
> index d3f3a049904fc..73b95240a1a6c 100644
> --- a/kernel/rcu/tree.c
> +++ b/kernel/rcu/tree.c
> @@ -770,8 +770,8 @@ static void rcu_gpnum_ovf(struct rcu_node *rnp, struct rcu_data *rdp)
>   */
>  static int dyntick_save_progress_counter(struct rcu_data *rdp)
>  {
> -	rdp->dynticks_snap = rcu_watching_snap(rdp->cpu);
> -	if (rcu_watching_in_eqs(rdp->dynticks_snap)) {
> +	rdp->watching_snap = rcu_watching_snap(rdp->cpu);
> +	if (rcu_watching_in_eqs(rdp->watching_snap)) {
>  		trace_rcu_fqs(rcu_state.name, rdp->gp_seq, rdp->cpu, TPS("dti"));
>  		rcu_gpnum_ovf(rdp->mynode, rdp);
>  		return 1;
> @@ -803,7 +803,7 @@ static int rcu_implicit_dynticks_qs(struct rcu_data *rdp)
>  	 * read-side critical section that started before the beginning
>  	 * of the current RCU grace period.
>  	 */
> -	if (rcu_watching_changed_since(rdp, rdp->dynticks_snap)) {
> +	if (rcu_watching_changed_since(rdp, rdp->watching_snap)) {
>  		trace_rcu_fqs(rcu_state.name, rdp->gp_seq, rdp->cpu, TPS("dti"));
>  		rcu_gpnum_ovf(rnp, rdp);
>  		return 1;
> diff --git a/kernel/rcu/tree.h b/kernel/rcu/tree.h
> index affcb92a358c3..ac153e365355d 100644
> --- a/kernel/rcu/tree.h
> +++ b/kernel/rcu/tree.h
> @@ -206,7 +206,7 @@ struct rcu_data {
>  	long		blimit;		/* Upper limit on a processed batch */
>  
>  	/* 3) dynticks interface. */
> -	int dynticks_snap;		/* Per-GP tracking for dynticks. */
> +	int  watching_snap;		/* Per-GP tracking for dynticks. */

/* Per-GP tracking for watching */

Thanks.

>  	bool rcu_need_heavy_qs;		/* GP old, so heavy quiescent state! */
>  	bool rcu_urgent_qs;		/* GP old need light quiescent state. */
>  	bool rcu_forced_tick;		/* Forced tick to provide QS. */
> -- 
> 2.43.0
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ