[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230115051510.GG2948950@paulmck-ThinkPad-P17-Gen-1>
Date: Sat, 14 Jan 2023 21:15:10 -0800
From: "Paul E. McKenney" <paulmck@...nel.org>
To: Alan Stern <stern@...land.harvard.edu>
Cc: Jonas Oberhauser <jonas.oberhauser@...wei.com>,
Peter Zijlstra <peterz@...radead.org>,
"parri.andrea" <parri.andrea@...il.com>, will <will@...nel.org>,
"boqun.feng" <boqun.feng@...il.com>, npiggin <npiggin@...il.com>,
dhowells <dhowells@...hat.com>,
"j.alglave" <j.alglave@....ac.uk>,
"luc.maranget" <luc.maranget@...ia.fr>, akiyks <akiyks@...il.com>,
dlustig <dlustig@...dia.com>, joel <joel@...lfernandes.org>,
urezki <urezki@...il.com>,
quic_neeraju <quic_neeraju@...cinc.com>,
frederic <frederic@...nel.org>,
Kernel development list <linux-kernel@...r.kernel.org>
Subject: Re: Internal vs. external barriers (was: Re: Interesting LKMM litmus
test)
On Sat, Jan 14, 2023 at 03:19:06PM -0500, Alan Stern wrote:
> On Sat, Jan 14, 2023 at 10:15:37AM -0800, Paul E. McKenney wrote:
> > Nevertheless, here is the resulting .bell fragment:
> >
> > ------------------------------------------------------------------------
> >
> > (* Compute matching pairs of Srcu-lock and Srcu-unlock *)
> > let srcu-rscs = ([Srcu-lock] ; data ; [Srcu-unlock]) & loc
> >
> > (* Validate nesting *)
> > flag ~empty Srcu-lock \ domain(srcu-rscs) as unbalanced-srcu-locking
> > flag ~empty Srcu-unlock \ range(srcu-rscs) as unbalanced-srcu-locking
> >
> > (* Check for use of synchronize_srcu() inside an RCU critical section *)
> > flag ~empty rcu-rscs & (po ; [Sync-srcu] ; po) as invalid-sleep
> >
> > (* Validate SRCU dynamic match *)
> > flag ~empty different-values(srcu-rscs) as srcu-bad-nesting
>
> I forgot to mention... An appropriate check for one srcu_read_lock()
> matched to more than one srcu_read_unlock() would be something like
> this:
>
> flag ~empty (srcu-rscs^-1 ; srcu-rscs) \ id as multiple-unlocks
I have added this, thank you!
> Alan
>
> PS: Do you agree that we should change the names of the first two flags
> above to unbalanced-srcu-lock and unbalanced-srcu-unlock, respectively
> (and similarly for the rcu checks)? It might help to be a little more
> specific about how the locking is wrong when we detect an error.
I have made this change, again, thank you!
But I also added this:
flag empty srcu-rscs as no-srcu-readers
And it is always flagged. So far, I have not found any sort of relation
that connects Srcu-lock to Srcu-unlock other than po. I tried data,
ctrl, addr, rf, rfi, and combinations thereof.
What am I missing here?
Thanx, Paul
Powered by blists - more mailing lists