diff options
author | Paul E. McKenney <paulmck@kernel.org> | 2023-11-25 03:23:56 +0300 |
---|---|---|
committer | Boqun Feng <boqun.feng@gmail.com> | 2024-02-14 18:53:49 +0300 |
commit | 3cf501612108b8a7a4cebf8a6ac1d7575080c88f (patch) | |
tree | afaab60db82a5c0454eac18db96687081c7b520a /Documentation/RCU | |
parent | 8dbc33b4d1a19ff43930dc983c457946241078e8 (diff) | |
download | linux-3cf501612108b8a7a4cebf8a6ac1d7575080c88f.tar.xz |
doc: Make checklist.rst note that spinlocks are implied RCU readers
In kernels built with CONFIG_PREEMPT_RT=n, spinlock critical sections
are RCU readers because they disable preemption. However, they are also
RCU readers in CONFIG_PREEMPT_RT=y because in that case the locking
primitives contain rcu_read_lock() and rcu_read_unlock(). Therefore,
upgrade checklist.rst to document this non-obvious case.
While in the area, fix a typo by changing "read-side critical" to
"read-side critical section".
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Diffstat (limited to 'Documentation/RCU')
-rw-r--r-- | Documentation/RCU/checklist.rst | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Documentation/RCU/checklist.rst b/Documentation/RCU/checklist.rst index 2d42998a89a6..98a622f77248 100644 --- a/Documentation/RCU/checklist.rst +++ b/Documentation/RCU/checklist.rst @@ -68,7 +68,8 @@ over a rather long period of time, but improvements are always welcome! rcu_read_lock_sched(), or by the appropriate update-side lock. Explicit disabling of preemption (preempt_disable(), for example) can serve as rcu_read_lock_sched(), but is less readable and - prevents lockdep from detecting locking issues. + prevents lockdep from detecting locking issues. Acquiring a + spinlock also enters an RCU read-side critical section. Please note that you *cannot* rely on code known to be built only in non-preemptible kernels. Such code can and will break, @@ -444,7 +445,7 @@ over a rather long period of time, but improvements are always welcome! real-time workloads than is synchronize_rcu_expedited(). It is also permissible to sleep in RCU Tasks Trace read-side - critical, which are delimited by rcu_read_lock_trace() and + critical section, which are delimited by rcu_read_lock_trace() and rcu_read_unlock_trace(). However, this is a specialized flavor of RCU, and you should not use it without first checking with its current users. In most cases, you should instead use SRCU. |