Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

doc: Update UP.rst

This commit updates UP.rst to reflect changes over the past few years,
including the advent of userspace RCU libraries for constrained systems.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>

+11 -2
+11 -2
Documentation/RCU/UP.rst
··· 38 38 from process context. However, this can fail in a similar manner. 39 39 40 40 Suppose that an RCU-based algorithm again scans a linked list containing 41 - elements A, B, and C in process contexts, but that it invokes a function 41 + elements A, B, and C in process context, but that it invokes a function 42 42 on each element as it is scanned. Suppose further that this function 43 43 deletes element B from the list, then passes it to call_rcu() for deferred 44 44 freeing. This may be a bit unconventional, but it is perfectly legal ··· 59 59 Suppose that call_rcu() is invoked while holding a lock, and that the 60 60 callback function must acquire this same lock. In this case, if 61 61 call_rcu() were to directly invoke the callback, the result would 62 - be self-deadlock. 62 + be self-deadlock *even if* this invocation occurred from a later 63 + call_rcu() invocation a full grace period later. 63 64 64 65 In some cases, it would possible to restructure to code so that 65 66 the call_rcu() is delayed until after the lock is released. However, ··· 85 84 What locking restriction must RCU callbacks respect? 86 85 87 86 :ref:`Answers to Quick Quiz <answer_quick_quiz_up>` 87 + 88 + It is important to note that userspace RCU implementations *do* 89 + permit call_rcu() to directly invoke callbacks, but only if a full 90 + grace period has elapsed since those callbacks were queued. This is 91 + the case because some userspace environments are extremely constrained. 92 + Nevertheless, people writing userspace RCU implementations are strongly 93 + encouraged to avoid invoking callbacks from call_rcu(), thus obtaining 94 + the deadlock-avoidance benefits called out above. 88 95 89 96 Summary 90 97 -------