Lines Matching +full:a +full:- +full:side
8 Sequence counters are a reader-writer consistency mechanism with
9 lockless readers (read-only retry loops), and no writer starvation. They
11 reader wants a consistent set of information and is willing to retry if
14 A data set is consistent when the sequence count at the beginning of the
15 read side critical section is even and the same sequence count value is
17 be copied out inside the read side critical section. If the sequence
24 the end of the write side critical section the sequence count becomes
27 A sequence counter write side critical section must never be preempted
28 or interrupted by read side sections. Otherwise the reader will spin for
30 interrupted writer. If that reader belongs to a real-time scheduling
34 as the writer can invalidate a pointer that the reader is following.
43 multiple writers. Write side critical sections must thus be serialized
48 write side section. If the read section can be invoked from hardirq or
53 requirements of writer serialization and non-preemptibility, use
76 /* ... [[write-side critical section]] ... */
85 /* ... [[read-side critical section]] ... */
93 -----------------------------------------------------------------
95 As discussed at :ref:`seqcount_t`, sequence count write side critical
96 sections must be serialized and non-preemptible. This variant of
99 side critical sections are properly serialized.
101 This lock association is a NOOP if lockdep is disabled and has neither
104 injected at the beginning of the write side critical section to validate
108 protection is enforced in the write side function.
112 - ``seqcount_spinlock_t``
113 - ``seqcount_raw_spinlock_t``
114 - ``seqcount_rwlock_t``
115 - ``seqcount_mutex_t``
116 - ``seqcount_ww_mutex_t``
118 The sequence counter read and write APIs can take either a plain
136 Write path: same as in :ref:`seqcount_t`, while running from a context
145 ----------------------------------------------
147 Latch sequence counters are a multiversion concurrency control mechanism
150 read path to safely interrupt its own write side critical section.
152 Use seqcount_latch_t when the write side sections cannot be protected
154 side can be invoked from NMI handlers.
165 embedded spinlock for writer serialization and non-preemptibility.
167 If the read side section can be invoked from hardirq or softirq context,
168 use the write side function variants which disable interrupts or bottom
189 /* ... [[write-side critical section]] ... */
195 1. Normal Sequence readers which never block a writer but they must
196 retry if a writer is in progress by detecting change in the sequence
197 number. Writers do not wait for a sequence reader::
202 /* ... [[read-side critical section]] ... */
206 2. Locking readers which will wait if a writer or another locking reader
207 is in progress. A locking reader in progress will also block a writer
213 /* ... [[read-side critical section]] ... */
218 according to a passed marker. This is used to avoid lockless readers
219 starvation (too much retry loops) in case of a sharp spike in write
220 activity. First, a lockless read is tried (even marker passed). If
222 the next iteration marker), the lockless read is transformed to a
230 /* ... [[read-side critical section]] ... */
239 .. kernel-doc:: include/linux/seqlock.h