[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANDhNCrSCrCgGDaGstS9=3vEqow=iiF5qWOhbzrstMbD5afXAQ@mail.gmail.com>
Date: Thu, 2 Feb 2023 19:56:05 -0800
From: John Stultz <jstultz@...gle.com>
To: paulmck@...nel.org
Cc: LKML <linux-kernel@...r.kernel.org>,
Davidlohr Bueso <dave@...olabs.net>,
Josh Triplett <josh@...htriplett.org>,
Joel Fernandes <joel@...lfernandes.org>,
Juri Lelli <juri.lelli@...hat.com>,
Valentin Schneider <vschneid@...hat.com>,
Dietmar Eggemann <dietmar.eggemann@....com>
Subject: Re: [RFC][PATCH 1/4] locktorture: Add nested_[un]lock() hooks and
nlocks parameter
On Thu, Feb 2, 2023 at 6:05 PM Paul E. McKenney <paulmck@...nel.org> wrote:
>
> On Thu, Feb 02, 2023 at 10:34:06PM +0000, John Stultz wrote:
> > In order ot extend locktorture to support lock nesting, add
> > nested_lock() and nested_unlock() hooks to the torture ops.
> >
> > These take a 32bit lockset mask which is generated at random,
> > so some number of locks will be taken before the main lock is
> > taken and released afterwards.
> >
> > Additionally, add nlocks module parameter to allow specifying
> > the number of nested locks to be used.
> >
> > This has been helpful to uncover issues in the proxy-exec
> > series development.
> >
> > This was inspired by locktorture extensions originally implemented
> > by Connor O'Brien, for stress testing the proxy-execution series:
> > https://lore.kernel.org/lkml/20221003214501.2050087-12-connoro@google.com/
> >
> > Comments or feedback would be greatly appreciated!
>
> I have pulled this in for testing and further review, thank you!
>
> Should either of these files have a locktorture.nlocks=<whatever>
> added?
>
> tools/testing/selftests/rcutorture/configs/lock/LOCK02.boot
> tools/testing/selftests/rcutorture/configs/lock/LOCK05.boot
>
> The first is for mutex_lock and the second for rtmutex_lock.
Potentially? I wasn't aware of these files. Is there some
documentation on the intent behind them?
While the nested locking is useful to cause different lock chains to
test boosting or proxy-execution, I worry they may cause extra noise
that could distract from just thrashing the *mutex lock primitive if
that's the existing intent.
So we might want additional config files for the nested case.
> This did pass a quick "torture.sh --do-none --do-locktorture", which is
> good, but this uses the existing .boot files.
Yeah, probably no effective change in that case.
thanks
-john
Powered by blists - more mailing lists