]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
rcu: Add comment documenting rcu_callback_map's purpose
authorPaul E. McKenney <paulmck@kernel.org>
Mon, 4 May 2020 02:16:09 +0000 (19:16 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Mon, 29 Jun 2020 18:58:49 +0000 (11:58 -0700)
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>
kernel/rcu/update.c

index f5a82e107bcb1b8cdae2c75e4b80f89304f94d03..ca17b771ad60aac4a4d9b763677ba14e3218b2cb 100644 (file)
@@ -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);