All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <frederic@kernel.org>
To: Valentin Schneider <vschneid@redhat.com>
Cc: rcu@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Paul E. McKenney" <paulmck@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Neeraj Upadhyay <quic_neeraju@quicinc.com>,
	Joel Fernandes <joel@joelfernandes.org>,
	Josh Triplett <josh@joshtriplett.org>,
	Boqun Feng <boqun.feng@gmail.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Lai Jiangshan <jiangshanlai@gmail.com>,
	Zqiang <qiang.zhang1211@gmail.com>
Subject: Re: [PATCH v2 20/27] rcu: Rename struct rcu_data .dynticks_snap into .watching_snap
Date: Wed, 8 May 2024 14:55:44 +0200	[thread overview]
Message-ID: <Zjt2UOBu57DUWi3_@localhost.localdomain> (raw)
In-Reply-To: <20240430091740.1826862-21-vschneid@redhat.com>

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@redhat.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
> 

  reply	other threads:[~2024-05-08 12:55 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-30  9:17 [PATCH v2 00/27] context_tracking, rcu: Spring cleaning renaming Valentin Schneider
2024-04-30  9:17 ` [PATCH v2 01/27] treewide: context_tracking: Rename CONTEXT_* into CT_STATE_* Valentin Schneider
2024-04-30  9:17 ` [PATCH v2 02/27] context_tracking, rcu: Rename RCU_DYNTICKS_IDX into CT_RCU_WATCHING Valentin Schneider
2024-05-06 10:39   ` Frederic Weisbecker
2024-04-30  9:17 ` [PATCH v2 03/27] context_tracking, rcu: Rename ct_dynticks() into ct_rcu_watching() Valentin Schneider
2024-05-06 10:41   ` Frederic Weisbecker
2024-04-30  9:17 ` [PATCH v2 04/27] context_tracking, rcu: Rename ct_dynticks_cpu() into ct_rcu_watching_cpu() Valentin Schneider
2024-05-06 10:43   ` Frederic Weisbecker
2024-04-30  9:17 ` [PATCH v2 05/27] context_tracking, rcu: Rename ct_dynticks_cpu_acquire() into ct_rcu_watching_cpu_acquire() Valentin Schneider
2024-05-06 10:45   ` Frederic Weisbecker
2024-04-30  9:17 ` [PATCH v2 06/27] context_tracking, rcu: Rename struct context_tracking .dynticks_nesting into .nesting Valentin Schneider
2024-05-06 10:48   ` Frederic Weisbecker
2024-04-30  9:17 ` [PATCH v2 07/27] context_tracking, rcu: Rename ct_dynticks_nesting() into ct_nesting() Valentin Schneider
2024-05-06 11:01   ` Frederic Weisbecker
2024-04-30  9:17 ` [PATCH v2 08/27] context_tracking, rcu: Rename ct_dynticks_nesting_cpu() into ct_nesting_cpu() Valentin Schneider
2024-05-06 20:09   ` Frederic Weisbecker
2024-04-30  9:17 ` [PATCH v2 09/27] context_tracking, rcu: Rename struct context_tracking .dynticks_nmi_nesting into .nmi_nesting Valentin Schneider
2024-05-06 20:19   ` Frederic Weisbecker
2024-04-30  9:17 ` [PATCH v2 10/27] context_tracking, rcu: Rename ct_dynticks_nmi_nesting() into ct_nmi_nesting() Valentin Schneider
2024-05-06 20:50   ` Frederic Weisbecker
2024-04-30  9:17 ` [PATCH v2 11/27] context_tracking, rcu: Rename ct_dynticks_nmi_nesting_cpu() into ct_nmi_nesting_cpu() Valentin Schneider
2024-05-06 21:03   ` Frederic Weisbecker
2024-04-30  9:17 ` [PATCH v2 12/27] context_tracking, rcu: Rename DYNTICK_IRQ_NONIDLE into CT_NESTING_IRQ_NONIDLE Valentin Schneider
2024-05-06 21:06   ` Frederic Weisbecker
2024-04-30  9:17 ` [PATCH v2 13/27] context_tracking, rcu: Rename rcu_dynticks_task*() into rcu_task*() Valentin Schneider
2024-05-06 21:15   ` Frederic Weisbecker
2024-05-08 14:39   ` Frederic Weisbecker
2024-05-13 18:39     ` Valentin Schneider
2024-04-30  9:17 ` [PATCH v2 14/27] context_tracking, rcu: Rename rcu_dynticks_curr_cpu_in_eqs() into rcu_watching_curr_cpu() Valentin Schneider
2024-05-06 22:00   ` Frederic Weisbecker
2024-04-30  9:17 ` [PATCH v2 15/27] rcu: Rename rcu_dynticks_eqs_online() into rcu_watching_eqs_online() Valentin Schneider
2024-05-06 22:18   ` Frederic Weisbecker
2024-05-07  8:59     ` Valentin Schneider
2024-04-30  9:17 ` [PATCH v2 16/27] rcu: Rename rcu_dynticks_snap() into rcu_watching_snap() Valentin Schneider
2024-05-07 13:11   ` Frederic Weisbecker
2024-04-30  9:17 ` [PATCH v2 17/27] rcu: Rename rcu_dynticks_in_eqs() into rcu_watching_in_eqs() Valentin Schneider
2024-05-07 13:32   ` Frederic Weisbecker
2024-05-07 15:48     ` Valentin Schneider
2024-05-08 10:46       ` Frederic Weisbecker
2024-04-30  9:17 ` [PATCH v2 18/27] rcu: Rename rcu_dynticks_in_eqs_since() into rcu_watching_changed_since() Valentin Schneider
2024-05-07 13:48   ` Frederic Weisbecker
2024-05-07 17:14     ` Paul E. McKenney
2024-05-08 10:59       ` Frederic Weisbecker
2024-05-13 18:40         ` Valentin Schneider
2024-05-14 10:42           ` Frederic Weisbecker
2024-04-30  9:17 ` [PATCH v2 19/27] rcu: Rename rcu_dynticks_zero_in_eqs() into rcu_watching_zero_in_eqs() Valentin Schneider
2024-05-08 12:43   ` Frederic Weisbecker
2024-04-30  9:17 ` [PATCH v2 20/27] rcu: Rename struct rcu_data .dynticks_snap into .watching_snap Valentin Schneider
2024-05-08 12:55   ` Frederic Weisbecker [this message]
2024-04-30  9:17 ` [PATCH v2 21/27] rcu: Rename struct rcu_data .exp_dynticks_snap into .exp_watching_snap Valentin Schneider
2024-05-08 13:06   ` Frederic Weisbecker
2024-04-30  9:17 ` [PATCH v2 22/27] rcu: Rename dyntick_save_progress_counter() into eqs_save_progress_counter() Valentin Schneider
2024-05-08 13:21   ` Frederic Weisbecker
2024-04-30  9:17 ` [PATCH v2 23/27] rcu: Rename rcu_implicit_dynticks_qs() into rcu_implicit_eqs() Valentin Schneider
2024-04-30  9:17 ` [PATCH v2 24/27] rcu: Rename rcu_momentary_dyntick_idle() into rcu_momentary_eqs() Valentin Schneider
2024-05-08 13:30   ` Frederic Weisbecker
2024-04-30  9:17 ` [PATCH v2 25/27] context_tracking, rcu: Rename stray ->dynticks comments Valentin Schneider
2024-05-08 13:39   ` Frederic Weisbecker
2024-04-30  9:17 ` [PATCH v2 26/27] rcu: Update stray documentation references to rcu_dynticks_eqs_{enter, exit}() Valentin Schneider
2024-05-08 14:55   ` Frederic Weisbecker
2024-05-13 18:40     ` Valentin Schneider
2024-04-30  9:17 ` [PATCH v2 27/27] context_tracking, rcu: Rename rcu_dyntick trace event into rcu_watching Valentin Schneider
2024-05-08 13:59   ` Frederic Weisbecker
2024-05-13 18:40     ` Valentin Schneider
2024-05-14 12:09       ` Frederic Weisbecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Zjt2UOBu57DUWi3_@localhost.localdomain \
    --to=frederic@kernel.org \
    --cc=boqun.feng@gmail.com \
    --cc=jiangshanlai@gmail.com \
    --cc=joel@joelfernandes.org \
    --cc=josh@joshtriplett.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=paulmck@kernel.org \
    --cc=peterz@infradead.org \
    --cc=qiang.zhang1211@gmail.com \
    --cc=quic_neeraju@quicinc.com \
    --cc=rcu@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=vschneid@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.