Lines Matching +full:write +full:- +full:only

1 .\" SPDX-License-Identifier: BSD-2-Clause
34 .Nd safe memory reclamation for lock-free data structures
74 memory-safe lock-free data structures.
75 In typical usage, read accesses to an SMR-protected data structure, such as a
85 In contrast with reader-writer locks such as
101 operate only on per-CPU data and thus avoid some of the performance problems
102 inherent in the implementation of traditional reader-writer mutexes.
104 accessed frequently but are only rarely modified.
106 Note that any SMR-protected data structure must be implemented carefully such
109 The data structure must be designed to be lock-free; SMR merely facilitates
117 This requirement results in a two-phase approach to the removal of items:
123 SMR provides this mechanism: readers may access a lock-free data structure in
137 state block which holds both per-CPU and global state.
138 Readers load global state and modify per-CPU state, while writers must scan all
139 per-CPU states to detect active readers.
141 performance in write-heavy workloads.
160 kernel memory allocator provides some SMR-specified facilities.
162 and automatically batches write operations.
171 To insert an item into an SMR-protected data structure, memory is allocated
179 Read-only lookup operations are performed in SMR read sections.
184 If the zone has an associated per-item destructor, it will be invoked at some
191 Consumers are expected to use SMR in conjunction with UMA and thus need only
198 However, an introduction to the write-side interface of SMR can be useful.
201 .Ql write sequence
205 loads a copy of the write sequence and stores it in per-CPU memory, hence
208 To exit a read section, this per-CPU memory is overwritten with an invalid
210 Writers perform two operations: advancing the write sequence number, and
219 After a writer unlinks an item from a data structure, it increments the write
228 items and tagging the entire batch with a target write sequence number.
231 is a non-blocking operation and returns true only if all active readers are
242 to wait for all CPUs to observe a new write sequence number.
243 This is an expensive operation and should only be used if polling cannot be
269 memory-safe read-only access to a data structure concurrent with modifications