Re: Internal vs. external barriers (was: Re: Interesting LKMM litmus test)

From: Paul E. McKenney
Date: Wed Jan 18 2023 - 12:43:24 EST


On Wed, Jan 18, 2023 at 11:03:35AM -0500, Alan Stern wrote:
> On Tue, Jan 17, 2023 at 09:17:04PM -0800, Paul E. McKenney wrote:
> > On Tue, Jan 17, 2023 at 09:15:15PM -0500, Alan Stern wrote:
> > > Maybe we don't. Please test the patch below; I think it will do what
> > > you want -- and it doesn't rule out nesting.
> >
> > It works like a champ on manual/kernel/C-srcu*.litmus in the litmus
> > repository on github, good show and thank you!!!
> >
> > I will make more tests, and am checking this against the rest of the
> > litmus tests in the repo, but in the meantime would you be willing to
> > have me add your Signed-off-by?
>
> I'll email a real patch submission in the not-too-distant future,
> assuming you don't find any problems with the new code.

Sounds good!

The current state is that last night's testing found a difference only
for C-srcu-nest-5.litmus, in which case your version gives the correct
answer and mainline is wrong. There were a couple of broken tests, which
I fixed and a test involving spin_unlock_wait(), which is at this point
perma-broken due to the Linux kernel no longer having such a thing.
(Other than its re-introduction into i915, but they define it as a
spin_lock_irq() followed by a spin_unlock_irq(), so why worry?)
There were also a few timeouts.

I intend to run the longer tests overnight.

I have not yet come up with a good heuristic to auto-classify
automatically generated tests involving SRCU, so I cannot justify making
you wait on me to get my act together on that.

Thanx, Paul