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
38 * full-barrier RMWs (successful cmpxchg(), xchg(), etc.) act as
47 ([M] ; fencerel(Before-atomic) ; [RMW] ; po? ; [M]) |
48 ([M] ; po? ; [RMW] ; fencerel(After-atomic) ; [M]) |
49 ([M] ; po? ; [LKW] ; fencerel(After-spinlock) ; [M]) |
51 * Note: The po-unlock-lock-po relation only passes the lock to the direct
55 * A-cumulative release fences of lock-release ensure that any stores that
61 ([M] ; po-unlock-lock-po ;
62 [After-unlock-lock] ; po ; [M]) |
63 ([M] ; po? ; [Srcu-unlock] ; fencerel(After-srcu-read-unlock) ; [M])
64 let gp = po ; [Sync-rcu | Sync-srcu] ; po?
65 let strong-fence = mb | gp
67 let nonrw-fence = strong-fence | po-rel | acq-po
68 let fence = nonrw-fence | wmb | rmb
69 let barrier = fencerel(Barrier | Rmb | Wmb | Mb | Sync-rcu | Sync-srcu |
70 Before-atomic | After-atomic | Acquire | Release |
71 Rcu-lock | Rcu-unlock | Srcu-lock | Srcu-unlock) |
80 acyclic po-loc | com as coherence
82 (* Atomic Read-Modify-Write *)
93 let to-w = rwdep | (overwrite & int) | (addr ; [Plain] ; wmb)
94 let to-r = (addr ; [R]) | (dep ; [Marked] ; rfi)
95 let ppo = to-r | to-w | (fence & int) | (po-unlock-lock-po & int)
98 let A-cumul(r) = (rfe ; [Marked])? ; r
99 let rmw-sequence = (rf ; rmw)*
100 let cumul-fence = [Marked] ; (A-cumul(strong-fence | po-rel) | wmb |
101 po-unlock-lock-po) ; [Marked] ; rmw-sequence
102 let prop = [Marked] ; (overwrite & ext)? ; cumul-fence* ;
110 acyclic hb as happens-before
116 (* Propagation: Each non-rf link needs a strong fence. *)
117 let pb = prop ; strong-fence ; hb* ; [Marked]
125 * Effects of read-side critical sections proceed from the rcu_read_unlock()
129 * In the definition of rcu-fence below, the po term at the left-hand side
130 * of each disjunct and the po? term at the right-hand end have been factored
131 * out. They have been moved into the definitions of rcu-link and rb.
134 let rcu-gp = [Sync-rcu] (* Compare with gp *)
135 let srcu-gp = [Sync-srcu]
136 let rcu-rscsi = rcu-rscs^-1
137 let srcu-rscsi = srcu-rscs^-1
141 * one but two non-rf relations, but only in conjunction with an RCU
142 * read-side critical section.
144 let rcu-link = po? ; hb* ; pb* ; prop ; po
147 * Any sequence containing at least as many grace periods as RCU read-side
148 * critical sections (joined by rcu-link) induces order like a generalized
149 * inter-CPU strong fence.
150 * Likewise for SRCU grace periods and read-side critical sections, provided
154 let rec rcu-order = rcu-gp | srcu-gp |
155 (rcu-gp ; rcu-link ; rcu-rscsi) |
156 ((srcu-gp ; rcu-link ; srcu-rscsi) & loc) |
157 (rcu-rscsi ; rcu-link ; rcu-gp) |
158 ((srcu-rscsi ; rcu-link ; srcu-gp) & loc) |
159 (rcu-gp ; rcu-link ; rcu-order ; rcu-link ; rcu-rscsi) |
160 ((srcu-gp ; rcu-link ; rcu-order ; rcu-link ; srcu-rscsi) & loc) |
161 (rcu-rscsi ; rcu-link ; rcu-order ; rcu-link ; rcu-gp) |
162 ((srcu-rscsi ; rcu-link ; rcu-order ; rcu-link ; srcu-gp) & loc) |
163 (rcu-order ; rcu-link ; rcu-order)
164 let rcu-fence = po ; rcu-order ; po?
165 let fence = fence | rcu-fence
166 let strong-fence = strong-fence | rcu-fence
169 let rb = prop ; rcu-fence ; hb* ; pb* ; [Marked]
174 * The happens-before, propagation, and rcu constraints are all
175 * expressions of temporal ordering. They could be replaced by
176 * a single constraint on an "executes-before" relation, xb:
179 * acyclic xb as executes-before
187 let mixed-accesses = ([Plain & W] ; (po-loc \ barrier) ; [Marked]) |
188 ([Marked] ; (po-loc \ barrier) ; [Plain & W])
189 flag ~empty mixed-accesses as mixed-accesses
191 (* Executes-before and visibility *)
193 let vis = cumul-fence* ; rfe? ; [Marked] ;
194 ((strong-fence ; [Marked] ; xbstar) | (xbstar & int))
197 let w-pre-bounded = [Marked] ; (addr | fence)?
198 let r-pre-bounded = [Marked] ; (addr | nonrw-fence |
200 let w-post-bounded = fence? ; [Marked] ; rmw-sequence
201 let r-post-bounded = (nonrw-fence | ([~Noreturn] ; fencerel(Rmb) ; [R4rmb]))? ;
204 (* Visibility and executes-before for plain accesses *)
205 let ww-vis = fence | (strong-fence ; xbstar ; w-pre-bounded) |
206 (w-post-bounded ; vis ; w-pre-bounded)
207 let wr-vis = fence | (strong-fence ; xbstar ; r-pre-bounded) |
208 (w-post-bounded ; vis ; r-pre-bounded)
209 let rw-xbstar = fence | (r-post-bounded ; xbstar ; w-pre-bounded)
212 let pre-race = ext & ((Plain * M) | ((M \ IW) * Plain))
215 let wr-incoh = pre-race & rf & rw-xbstar^-1
216 let rw-incoh = pre-race & fr & wr-vis^-1
217 let ww-incoh = pre-race & co & ww-vis^-1
218 empty (wr-incoh | rw-incoh | ww-incoh) as plain-coherence
221 let ww-nonrace = ww-vis & ((Marked * W) | rw-xbstar) & ((W * Marked) | wr-vis)
222 let ww-race = (pre-race & co) \ ww-nonrace
223 let wr-race = (pre-race & (co? ; rf)) \ wr-vis \ rw-xbstar^-1
224 let rw-race = (pre-race & fr) \ rw-xbstar
226 flag ~empty (ww-race | wr-race | rw-race) as data-race