summaryrefslogtreecommitdiffstats
path: root/Documentation/RCU
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@kernel.org>2023-12-11 20:55:17 +0100
committerBoqun Feng <boqun.feng@gmail.com>2024-02-14 16:53:50 +0100
commit56823e9f60f0eedb9981f28b664232a9cace1015 (patch)
tree8b438539f0db581dd47e432b0a2c669a75d1a8ab /Documentation/RCU
parentcontext_tracking: Fix kerneldoc headers for __ct_user_{enter,exit}() (diff)
downloadlinux-56823e9f60f0eedb9981f28b664232a9cace1015.tar.xz
linux-56823e9f60f0eedb9981f28b664232a9cace1015.zip
doc: Clarify use of slab constructors and SLAB_TYPESAFE_BY_RCU
This commit explicitly states that you should initialize any locks to be used by readers in your SLAB_TYPESAFE_BY_RCU constructor. 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/whatisRCU.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/Documentation/RCU/whatisRCU.rst b/Documentation/RCU/whatisRCU.rst
index 246ce0d0b4d1..872ac665223f 100644
--- a/Documentation/RCU/whatisRCU.rst
+++ b/Documentation/RCU/whatisRCU.rst
@@ -963,8 +963,8 @@ unfortunately any spinlock in a ``SLAB_TYPESAFE_BY_RCU`` object must be
initialized after each and every call to kmem_cache_alloc(), which renders
reference-free spinlock acquisition completely unsafe. Therefore, when
using ``SLAB_TYPESAFE_BY_RCU``, make proper use of a reference counter.
-(Those willing to use a kmem_cache constructor may also use locking,
-including cache-friendly sequence locking.)
+(Those willing to initialize their locks in a kmem_cache constructor
+may also use locking, including cache-friendly sequence locking.)
With traditional reference counting -- such as that implemented by the
kref library in Linux -- there is typically code that runs when the last