/linux/kernel/locking/ |
A D | rwbase_rt.c | 61 for (r = atomic_read(&rwb->readers); r < 0;) { in rwbase_read_trylock() 62 if (likely(atomic_try_cmpxchg_acquire(&rwb->readers, &r, r + 1))) in rwbase_read_trylock() 79 if (atomic_read(&rwb->readers) != WRITER_BIAS) { in __rwbase_read_lock() 80 atomic_inc(&rwb->readers); in __rwbase_read_lock() 129 atomic_inc(&rwb->readers); in __rwbase_read_lock() 178 if (unlikely(atomic_dec_and_test(&rwb->readers))) in rwbase_read_unlock() 191 (void)atomic_add_return_release(READER_BIAS - bias, &rwb->readers); in __rwbase_write_unlock() 224 if (!atomic_read_acquire(&rwb->readers)) { in __rwbase_write_trylock() 225 atomic_set(&rwb->readers, WRITER_BIAS); in __rwbase_write_trylock() 243 atomic_sub(READER_BIAS, &rwb->readers); in rwbase_write_lock() [all …]
|
A D | rwsem.c | 776 int readers = count >> RWSEM_READER_SHIFT; in rwsem_rspin_threshold() local 779 if (readers > 30) in rwsem_rspin_threshold() 780 readers = 30; in rwsem_rspin_threshold() 781 delta = (20 + readers) * NSEC_PER_USEC / 2; in rwsem_rspin_threshold() 1457 int count = atomic_read(&sem->rwbase.readers); in is_rwsem_reader_owned()
|
/linux/include/linux/ |
A D | rwbase_rt.h | 12 atomic_t readers; member 18 .readers = ATOMIC_INIT(READER_BIAS), \ 25 atomic_set(&(rwbase)->readers, READER_BIAS); \ 31 return atomic_read(&rwb->readers) != READER_BIAS; in rw_base_is_locked() 36 return atomic_read(&rwb->readers) > 0; in rw_base_is_contended()
|
A D | rwlock_types.h | 59 atomic_t readers; member
|
/linux/fs/btrfs/ |
A D | locking.c | 222 atomic_set(&lock->readers, 0); in btrfs_drew_lock_init() 237 if (atomic_read(&lock->readers)) in btrfs_drew_try_write_lock() 244 if (atomic_read(&lock->readers)) { in btrfs_drew_try_write_lock() 257 wait_event(lock->pending_writers, !atomic_read(&lock->readers)); in btrfs_drew_write_lock() 269 atomic_inc(&lock->readers); in btrfs_drew_read_lock() 289 if (atomic_dec_and_test(&lock->readers)) in btrfs_drew_read_unlock()
|
A D | subpage.c | 153 atomic_set(&ret->readers, 0); in btrfs_alloc_subpage() 228 atomic_add(nbits, &subpage->readers); in btrfs_subpage_start_reader() 241 ASSERT(atomic_read(&subpage->readers) >= nbits); in btrfs_subpage_end_reader() 242 last = atomic_sub_and_test(nbits, &subpage->readers); in btrfs_subpage_end_reader() 282 ASSERT(atomic_read(&subpage->readers) == 0); in btrfs_subpage_start_writer()
|
A D | locking.h | 120 atomic_t readers; member
|
/linux/Documentation/RCU/ |
A D | checklist.rst | 30 One final exception is where RCU readers are used to prevent 94 locks (that are acquired by both readers and writers) 96 the readers refrain from accessing can be guarded by 101 c. Make updates appear atomic to readers. For example, 105 appear to be atomic to RCU readers, nor will sequences 111 readers see valid data at all phases of the update. 152 is common to readers and updaters. However, lockdep 229 then the readers must refrain from executing voluntary 401 when you need lightweight readers. 415 that readers can follow that could be affected by the [all …]
|
A D | rcu.rst | 10 must be long enough that any readers accessing the item being deleted have 22 The advantage of RCU's two-part approach is that RCU readers need 27 in read-mostly situations. The fact that RCU readers need not 31 if the RCU readers give no indication when they are done? 33 Just as with spinlocks, RCU readers are not permitted to 43 same effect, but require that the readers manipulate CPU-local
|
A D | whatisRCU.rst | 72 readers is the semantics of modern CPUs guarantee that readers will see 92 readers cannot gain a reference to it. 94 b. Wait for all previous readers to complete their RCU read-side 102 The ability to wait until all readers are done allows RCU readers to 112 readers. Concurrent RCU readers can then continue accessing the old 206 readers are done, its implementation is key to RCU. For RCU 472 This primitive protects concurrent readers from the updater, 1003 a. Will readers need to block? If so, you need SRCU. 1006 in an non-rt kernel, you need SRCU. If readers would block 1075 allows latency to "bleed" from readers to other [all …]
|
A D | lockdep.rst | 41 invoked by both RCU readers and updaters. 45 is invoked by both RCU-bh readers and updaters. 49 is invoked by both RCU-sched readers and updaters. 53 is invoked by both SRCU readers and updaters.
|
A D | rcubarrier.rst | 10 very low-overhead readers that are immune to deadlock, priority inversion, 16 readers, so that RCU updates to shared data must be undertaken quite 18 pre-existing readers have finished. These old versions are needed because 19 such readers might hold a reference to them. RCU updates can therefore be 22 How can an RCU writer possibly determine when all readers are finished, 23 given that readers might well leave absolutely no trace of their 25 pre-existing readers have completed. An updater wishing to delete an
|
A D | listRCU.rst | 52 with the ``tasklist_lock``. To prevent readers from noticing changes in the list 55 ensures that any readers traversing the list will see valid ``p->tasks.next`` 58 memory until all existing readers finish. 195 need for writers to exclude readers. 202 readers to fail spectacularly. 204 So, when readers can tolerate stale data and when entries are either added or
|
/linux/drivers/misc/cardreader/ |
A D | Kconfig | 9 Alcor Micro card readers support access to many types of memory cards, 20 Realtek card readers support access to many types of memory cards, 29 Select this option to get support for Realtek USB 2.0 card readers
|
/linux/Documentation/locking/ |
A D | lockdep-design.rst | 410 r: stands for non-recursive readers. 411 R: stands for recursive readers. 424 The difference between recursive readers and non-recursive readers is because: 426 readers could get blocked by a write lock *waiter*. Considering the follow 442 Block conditions on readers/writers of the same lock instance: 448 3. Writers block both recursive readers and non-recursive readers. 449 4. And readers (recursive or not) don't block other recursive readers but 450 may block non-recursive readers (because of the potential co-existing 465 (W: writers, r: non-recursive readers, R: recursive readers) 527 recursive readers and non-recursive readers for L1 (as they block the same types) and [all …]
|
A D | seqlock.rst | 9 lockless readers (read-only retry loops), and no writer starvation. They 23 is odd and indicates to the readers that an update is in progress. At 25 even again which lets readers make progress. 153 from interruption by readers. This is typically the case when the read 195 1. Normal Sequence readers which never block a writer but they must 206 2. Locking readers which will wait if a writer or another locking reader 218 according to a passed marker. This is used to avoid lockless readers
|
A D | locktypes.rst | 95 readers. 135 rw_semaphore is a multiple readers and single writer lock mechanism. 141 exist special-purpose interfaces that allow non-owner release for readers. 151 readers, a preempted low-priority reader will continue holding its lock, 152 thus starving even high-priority writers. In contrast, because readers 155 writer from starving readers. 302 rwlock_t is a multiple readers and single writer lock mechanism. 317 readers, a preempted low-priority reader will continue holding its lock, 318 thus starving even high-priority writers. In contrast, because readers 321 preventing that writer from starving readers.
|
/linux/fs/ |
A D | pipe.c | 410 !READ_ONCE(pipe->readers); in pipe_writable() 431 if (!pipe->readers) { in pipe_write() 479 if (!pipe->readers) { in pipe_write() 690 if (!pipe->readers) in pipe_poll() 719 pipe->readers--; in pipe_release() 724 if (!pipe->readers != !pipe->writers) { in pipe_release() 883 pipe->readers = pipe->writers = 1; in get_pipe_inode() 1135 if (pipe->readers++ == 0) in fifo_open() 1164 if (!is_pipe && !pipe->readers) { in fifo_open() 1178 pipe->readers++; in fifo_open() [all …]
|
A D | splice.c | 194 if (unlikely(!pipe->readers)) { in splice_to_pipe() 237 if (unlikely(!pipe->readers)) { in add_to_pipe() 845 pipe->readers = 1; in splice_direct_to_actor() 990 if (unlikely(!pipe->readers)) { in wait_for_space() 1414 if (!pipe->readers) { in opipe_prep() 1473 if (!opipe->readers) { in splice_pipe_to_pipe() 1597 if (!opipe->readers) { in link_pipe()
|
/linux/drivers/misc/ibmasm/ |
A D | event.c | 30 list_for_each_entry(reader, &sp->event_buffer->readers, node) in wake_up_event_readers() 123 list_add(&reader->node, &sp->event_buffer->readers); in ibmasm_event_reader_register() 153 INIT_LIST_HEAD(&buffer->readers); in ibmasm_event_buffer_init()
|
/linux/drivers/soc/aspeed/ |
A D | aspeed-p2a-ctrl.c | 65 u32 readers; member 192 ctrl->readers += 1; in aspeed_p2a_ioctl() 275 priv->parent->readers -= priv->read; in aspeed_p2a_release() 299 if (!open_regions && priv->parent->readers == 0) in aspeed_p2a_release()
|
/linux/drivers/hid/ |
A D | hid-roccat.c | 47 struct list_head readers; member 191 list_add_tail(&reader->node, &device->readers); in roccat_open() 268 list_for_each_entry(reader, &device->readers, node) { in roccat_report_event() 335 INIT_LIST_HEAD(&device->readers); in roccat_connect()
|
/linux/drivers/iio/ |
A D | TODO | 17 to state struct and using property handlers and readers.
|
/linux/kernel/rcu/ |
A D | Kconfig | 102 these readers to appear in the idle loop as well as on the CPU 195 This option boosts the priority of preempted RCU readers that 211 readers blocking that grace period. Note that any RCU reader 245 bool "Tasks Trace RCU readers use memory barriers in user and idle"
|
/linux/drivers/mtd/ubi/ |
A D | kapi.c | 162 vol->readers += 1; in ubi_open_volume() 172 if (vol->exclusive || vol->writers || vol->readers || in ubi_open_volume() 336 vol->readers -= 1; in ubi_close_volume()
|