aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/kernel/rcu
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@kernel.org>2020-05-03 19:16:09 -0700
committerPaul E. McKenney <paulmck@kernel.org>2020-06-29 11:58:49 -0700
commitf8466f94685b5bd931384526cf51e090fd2ac706 (patch)
tree3f4336becb9cf16cf590d9c400233e17203dcd0b /kernel/rcu
parentrcu: Add callbacks-invoked counters (diff)
downloadwireguard-linux-f8466f94685b5bd931384526cf51e090fd2ac706.tar.xz
wireguard-linux-f8466f94685b5bd931384526cf51e090fd2ac706.zip
rcu: Add comment documenting rcu_callback_map's purpose
The rcu_callback_map lockdep_map structure was added back in 2013, but its purpose has become obscure. This commit therefore documments that the purpose of rcu_callback map is, in the words of commit 24ef659a857 ("rcu: Provide better diagnostics for blocking in RCU callback functions"), to help lockdep to tie an "inappropriate voluntary context switch back to the fact that the function is being invoked from within a callback." Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'kernel/rcu')
-rw-r--r--kernel/rcu/update.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/rcu/update.c b/kernel/rcu/update.c
index f5a82e107bcb..ca17b771ad60 100644
--- a/kernel/rcu/update.c
+++ b/kernel/rcu/update.c
@@ -279,6 +279,7 @@ struct lockdep_map rcu_sched_lock_map = {
};
EXPORT_SYMBOL_GPL(rcu_sched_lock_map);
+// Tell lockdep when RCU callbacks are being invoked.
static struct lock_class_key rcu_callback_key;
struct lockdep_map rcu_callback_map =
STATIC_LOCKDEP_MAP_INIT("rcu_callback", &rcu_callback_key);