lkml.org 
[lkml]   [2023]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Internal vs. external barriers (was: Re: Interesting LKMM litmus test)
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

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.

\
 
 \ /
  Last update: 2023-03-26 23:41    [W:0.119 / U:1.564 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site