mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@kernel.org>
To: Joel Fernandes <joelagnelf@nvidia.com>
Cc: linux-kernel@vger.kernel.org, Jonathan Corbet <corbet@lwn.net>,
	Frederic Weisbecker <frederic@kernel.org>,
	Neeraj Upadhyay <neeraj.upadhyay@kernel.org>,
	Joel Fernandes <joel@joelfernandes.org>,
	Josh Triplett <josh@joshtriplett.org>,
	Boqun Feng <boqun.feng@gmail.com>,
	Uladzislau Rezki <urezki@gmail.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Lai Jiangshan <jiangshanlai@gmail.com>,
	Zqiang <qiang.zhang1211@gmail.com>,
	Davidlohr Bueso <dave@stgolabs.net>,
	rcu@vger.kernel.org, linux-doc@vger.kernel.org
Subject: Re: [PATCH v5] rcutorture: Perform more frequent testing of ->gpwrap
Date: Mon, 21 Apr 2025 11:32:51 -0700	[thread overview]
Message-ID: <6e1d8bbb-41b6-4e5f-878a-c35a7405444b@paulmck-laptop> (raw)
In-Reply-To: <cdc20491-a0a8-4dfd-9326-797bb0de0f90@nvidia.com>

On Mon, Apr 21, 2025 at 01:53:17PM -0400, Joel Fernandes wrote:
> On 4/21/2025 1:47 PM, Joel Fernandes wrote:
> > Currently, the ->gpwrap is not tested (at all per my testing) due to the
> > requirement of a large delta between a CPU's rdp->gp_seq and its node's
> > rnp->gpseq.
> > 
> > This results in no testing of ->gpwrap being set. This patch by default
> > adds 5 minutes of testing with ->gpwrap forced by lowering the delta
> > between rdp->gp_seq and rnp->gp_seq to just 8 GPs. All of this is
> > configurable, including the active time for the setting and a full
> > testing cycle.
> > 
> > By default, the first 25 minutes of a test will have the _default_
> > behavior there is right now (ULONG_MAX / 4) delta. Then for 5 minutes,
> > we switch to a smaller delta causing 1-2 wraps in 5 minutes. I believe
> > this is reasonable since we at least add a little bit of testing for
> > usecases where ->gpwrap is set.
> > 
> > Tested-by: Paul E. McKenney <paulmck@kernel.org>
> > Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com>
> > ---
> > v4->v5
> >  - Added gpwrap_lag torture param to turn off entire test.
> >  - replaced references to 'ovf' with 'gpwrap lag'.
> > 
> > Will move this to my rcu/torture-for-6.16 and update my rcu/for-next branches.
> >  
> >  .../admin-guide/kernel-parameters.txt         |  5 ++
> >  kernel/rcu/rcu.h                              |  4 ++
> >  kernel/rcu/rcutorture.c                       | 72 ++++++++++++++++++-
> >  kernel/rcu/tree.c                             | 34 ++++++++-
> >  kernel/rcu/tree.h                             |  1 +
> >  5 files changed, 113 insertions(+), 3 deletions(-)
> > 
> > diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
> > index 76e538c77e31..e1d11b6595fd 100644
> > --- a/Documentation/admin-guide/kernel-parameters.txt
> > +++ b/Documentation/admin-guide/kernel-parameters.txt
> > @@ -5657,6 +5657,11 @@
> >  			are zero, rcutorture acts as if is interpreted
> >  			they are all non-zero.
> >  
> > +	rcutorture.gpwrap_lag= [KNL]
> > +			Enable grace-period wrap lag testing. Setting
> > +			to false prevents the gpwrap lag test from
> > +			running.
> > +
> FYI, I added docs for the additional params here as well:

Even better, thank you!

> +       rcutorture.gpwrap_lag= [KNL]
> +                       Enable grace-period wrap lag testing. Setting
> +                       to false prevents the gpwrap lag test from
> +                       running.
> +
> +       rcutorture.gpwrap_lag_gps= [KNL]
> +                       Set the value for grace-period wrap lag during
> +                       active lag testing periods. This controls how many
> +                       grace periods differences we tolerate between
> +                       rdp and rnp's gp_seq before setting overflow flag.

I suggest adding the default, as well as the default when no testing
is taking place.

							Thanx, Paul

> +       rcutorture.gpwrap_lag_cycle_mins= [KNL]
> +                       Set the total cycle duration for gpwrap lag
> +                       testing in minutes. This is the total time for
> +                       one complete cycle of active and inactive
> +                       testing periods. Default is 30 minutes.
> +
> +       rcutorture.gpwrap_lag_active_mins= [KNL]
> +                       Set the duration for which gpwrap lag is active
> +                       within each cycle, in minutes. During this time,
> +                       the grace-period wrap lag will be set to the
> +                       value specified by gpwrap_lag_gps. Default is
> +                       5 minutes.
> +
> 
> 
> Will push this to my rcu/torture-for-6.16 and also update my rcu/for-next branch.
> 
>  - Joel
> 
> 

  reply	other threads:[~2025-04-21 18:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-21 17:47 Joel Fernandes
2025-04-21 17:53 ` Joel Fernandes
2025-04-21 18:32   ` Paul E. McKenney [this message]
2025-04-21 20:27     ` Joel Fernandes

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=6e1d8bbb-41b6-4e5f-878a-c35a7405444b@paulmck-laptop \
    --to=paulmck@kernel.org \
    --cc=boqun.feng@gmail.com \
    --cc=corbet@lwn.net \
    --cc=dave@stgolabs.net \
    --cc=frederic@kernel.org \
    --cc=jiangshanlai@gmail.com \
    --cc=joel@joelfernandes.org \
    --cc=joelagnelf@nvidia.com \
    --cc=josh@joshtriplett.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=neeraj.upadhyay@kernel.org \
    --cc=qiang.zhang1211@gmail.com \
    --cc=rcu@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=urezki@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®