Lines Matching +full:non +full:- +full:temporal
1 // SPDX-License-Identifier: GPL-2.0+
9 * "Frightening small children and disconcerting grown-ups: Concurrency
14 "Linux-kernel memory consistency model"
28 let acq-po = [Acquire] ; po ; [M]
29 let po-rel = [M] ; po ; [Release]
30 let po-unlock-lock-po = po ; [UL] ; (po|rf) ; [LKR] ; po
37 ([M] ; fencerel(Before-atomic) ; [RMW] ; po? ; [M]) |
38 ([M] ; po? ; [RMW] ; fencerel(After-atomic) ; [M]) |
39 ([M] ; po? ; [LKW] ; fencerel(After-spinlock) ; [M]) |
41 * Note: The po-unlock-lock-po relation only passes the lock to the direct
45 * A-cumulative release fences of lock-release ensure that any stores that
51 ([M] ; po-unlock-lock-po ;
52 [After-unlock-lock] ; po ; [M]) |
53 ([M] ; po? ; [Srcu-unlock] ; fencerel(After-srcu-read-unlock) ; [M])
54 let gp = po ; [Sync-rcu | Sync-srcu] ; po?
55 let strong-fence = mb | gp
57 let nonrw-fence = strong-fence | po-rel | acq-po
58 let fence = nonrw-fence | wmb | rmb
59 let barrier = fencerel(Barrier | Rmb | Wmb | Mb | Sync-rcu | Sync-srcu |
60 Before-atomic | After-atomic | Acquire | Release |
61 Rcu-lock | Rcu-unlock | Srcu-lock | Srcu-unlock) |
70 acyclic po-loc | com as coherence
72 (* Atomic Read-Modify-Write *)
83 let to-w = rwdep | (overwrite & int) | (addr ; [Plain] ; wmb)
84 let to-r = (addr ; [R]) | (dep ; [Marked] ; rfi)
85 let ppo = to-r | to-w | (fence & int) | (po-unlock-lock-po & int)
88 let A-cumul(r) = (rfe ; [Marked])? ; r
89 let rmw-sequence = (rf ; rmw)*
90 let cumul-fence = [Marked] ; (A-cumul(strong-fence | po-rel) | wmb |
91 po-unlock-lock-po) ; [Marked] ; rmw-sequence
92 let prop = [Marked] ; (overwrite & ext)? ; cumul-fence* ;
100 acyclic hb as happens-before
106 (* Propagation: Each non-rf link needs a strong fence. *)
107 let pb = prop ; strong-fence ; hb* ; [Marked]
115 * Effects of read-side critical sections proceed from the rcu_read_unlock()
119 * In the definition of rcu-fence below, the po term at the left-hand side
120 * of each disjunct and the po? term at the right-hand end have been factored
121 * out. They have been moved into the definitions of rcu-link and rb.
124 let rcu-gp = [Sync-rcu] (* Compare with gp *)
125 let srcu-gp = [Sync-srcu]
126 let rcu-rscsi = rcu-rscs^-1
127 let srcu-rscsi = srcu-rscs^-1
131 * one but two non-rf relations, but only in conjunction with an RCU
132 * read-side critical section.
134 let rcu-link = po? ; hb* ; pb* ; prop ; po
137 * Any sequence containing at least as many grace periods as RCU read-side
138 * critical sections (joined by rcu-link) induces order like a generalized
139 * inter-CPU strong fence.
140 * Likewise for SRCU grace periods and read-side critical sections, provided
144 let rec rcu-order = rcu-gp | srcu-gp |
145 (rcu-gp ; rcu-link ; rcu-rscsi) |
146 ((srcu-gp ; rcu-link ; srcu-rscsi) & loc) |
147 (rcu-rscsi ; rcu-link ; rcu-gp) |
148 ((srcu-rscsi ; rcu-link ; srcu-gp) & loc) |
149 (rcu-gp ; rcu-link ; rcu-order ; rcu-link ; rcu-rscsi) |
150 ((srcu-gp ; rcu-link ; rcu-order ; rcu-link ; srcu-rscsi) & loc) |
151 (rcu-rscsi ; rcu-link ; rcu-order ; rcu-link ; rcu-gp) |
152 ((srcu-rscsi ; rcu-link ; rcu-order ; rcu-link ; srcu-gp) & loc) |
153 (rcu-order ; rcu-link ; rcu-order)
154 let rcu-fence = po ; rcu-order ; po?
155 let fence = fence | rcu-fence
156 let strong-fence = strong-fence | rcu-fence
159 let rb = prop ; rcu-fence ; hb* ; pb* ; [Marked]
164 * The happens-before, propagation, and rcu constraints are all
165 * expressions of temporal ordering. They could be replaced by
166 * a single constraint on an "executes-before" relation, xb:
169 * acyclic xb as executes-before
177 let mixed-accesses = ([Plain & W] ; (po-loc \ barrier) ; [Marked]) |
178 ([Marked] ; (po-loc \ barrier) ; [Plain & W])
179 flag ~empty mixed-accesses as mixed-accesses
181 (* Executes-before and visibility *)
183 let vis = cumul-fence* ; rfe? ; [Marked] ;
184 ((strong-fence ; [Marked] ; xbstar) | (xbstar & int))
187 let w-pre-bounded = [Marked] ; (addr | fence)?
188 let r-pre-bounded = [Marked] ; (addr | nonrw-fence |
190 let w-post-bounded = fence? ; [Marked] ; rmw-sequence
191 let r-post-bounded = (nonrw-fence | ([~Noreturn] ; fencerel(Rmb) ; [R4rmb]))? ;
194 (* Visibility and executes-before for plain accesses *)
195 let ww-vis = fence | (strong-fence ; xbstar ; w-pre-bounded) |
196 (w-post-bounded ; vis ; w-pre-bounded)
197 let wr-vis = fence | (strong-fence ; xbstar ; r-pre-bounded) |
198 (w-post-bounded ; vis ; r-pre-bounded)
199 let rw-xbstar = fence | (r-post-bounded ; xbstar ; w-pre-bounded)
202 let pre-race = ext & ((Plain * M) | ((M \ IW) * Plain))
205 let wr-incoh = pre-race & rf & rw-xbstar^-1
206 let rw-incoh = pre-race & fr & wr-vis^-1
207 let ww-incoh = pre-race & co & ww-vis^-1
208 empty (wr-incoh | rw-incoh | ww-incoh) as plain-coherence
211 let ww-nonrace = ww-vis & ((Marked * W) | rw-xbstar) & ((W * Marked) | wr-vis)
212 let ww-race = (pre-race & co) \ ww-nonrace
213 let wr-race = (pre-race & (co? ; rf)) \ wr-vis \ rw-xbstar^-1
214 let rw-race = (pre-race & fr) \ rw-xbstar
216 flag ~empty (ww-race | wr-race | rw-race) as data-race