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

Document the fact that RCU callbacks can run in parallel

Add an item to the RCU documentation checklist noting that RCU callbacks
can run in parallel.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Paul E. McKenney and committed by
Linus Torvalds
ef48bd24 4d3b573a

+9 -1
+9 -1
Documentation/RCU/checklist.txt
··· 222 222 deadlock as soon as the RCU callback happens to interrupt that 223 223 acquisition's critical section. 224 224 225 - 13. SRCU (srcu_read_lock(), srcu_read_unlock(), and synchronize_srcu()) 225 + 13. RCU callbacks can be and are executed in parallel. In many cases, 226 + the callback code simply wrappers around kfree(), so that this 227 + is not an issue (or, more accurately, to the extent that it is 228 + an issue, the memory-allocator locking handles it). However, 229 + if the callbacks do manipulate a shared data structure, they 230 + must use whatever locking or other synchronization is required 231 + to safely access and/or modify that data structure. 232 + 233 + 14. SRCU (srcu_read_lock(), srcu_read_unlock(), and synchronize_srcu()) 226 234 may only be invoked from process context. Unlike other forms of 227 235 RCU, it -is- permissible to block in an SRCU read-side critical 228 236 section (demarked by srcu_read_lock() and srcu_read_unlock()),