Lines Matching refs:recursive
405 spin_lock() or write_lock()), non-recursive readers (i.e. shared lockers, like
406 down_read()) and recursive readers (recursive shared lockers, like rcu_read_lock()).
410 r: stands for non-recursive readers.
411 R: stands for recursive readers.
412 S: stands for all readers (non-recursive + recursive), as both are shared lockers.
413 N: stands for writers and non-recursive readers, as both are not recursive.
421 While non-recursive readers will cause a self deadlock if trying to acquire inside
424 The difference between recursive readers and non-recursive readers is because:
425 recursive readers get blocked only by a write lock *holder*, while non-recursive
435 Task A gets the reader (no matter whether recursive or non-recursive) on X via
437 and become a waiter for writer on X. Now if read_lock_2() is recursive readers,
438 task A will make progress, because writer waiters don't block recursive readers,
439 and there is no deadlock. However, if read_lock_2() is non-recursive readers,
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)
468 acquired recursively. Unlike non-recursive read locks, recursive read locks
480 is not a deadlock for recursive read locks, as while the task B is waiting for
481 the lock X, the second read_lock() doesn't need to wait because it's a recursive
482 read lock. However if the read_lock() is non-recursive read lock, then the above
486 Note that a lock can be a write lock (exclusive lock), a non-recursive read
487 lock (non-recursive shared lock) or a recursive read lock (recursive shared
491 functions: exclusive, non-recursive read, and recursive read.
493 To be concise, we call that write locks and non-recursive read locks as
494 "non-recursive" locks and recursive read locks as "recursive" locks.
496 Recursive locks don't block each other, while non-recursive locks do (this is
497 even true for two non-recursive read locks). A non-recursive lock can block the
498 corresponding recursive lock, and vice versa.
500 A deadlock case with recursive locks involved is as follow::
527 recursive readers and non-recursive readers for L1 (as they block the same types) and
528 we can combine writers and non-recursive readers for L2 (as they get blocked by the
535 exclusive writer to recursive reader dependency, "X -(ER)-> Y" means
536 X -> Y and X is a writer and Y is a recursive reader.
539 exclusive writer to non-recursive locker dependency, "X -(EN)-> Y" means
540 X -> Y and X is a writer and Y is either a writer or non-recursive reader.
543 shared reader to recursive reader dependency, "X -(SR)-> Y" means
544 X -> Y and X is a reader (recursive or not) and Y is a recursive reader.
547 shared reader to non-recursive locker dependency, "X -(SN)-> Y" means
548 X -> Y and X is a reader (recursive or not) and Y is either a writer or
549 non-recursive reader.
627 means either L2 in L1 -> L2 is a non-recursive locker (blocked by anyone) or
655 so it's impossible that Lx on Px+1 is a reader and Lx on Px is a recursive
656 reader, because readers (no matter recursive or not) don't block recursive