[<prev] [next>] [day] [month] [year] [list]
Message-ID: <159618741794.4006.10712403272167911777.tip-bot2@tip-bot2>
Date: Fri, 31 Jul 2020 09:23:37 -0000
From: "tip-bot2 for Paul E. McKenney" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: "Paul E. McKenney" <paulmck@...nel.org>, x86 <x86@...nel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: [tip: core/rcu] rcu: Add comment documenting rcu_callback_map's purpose
The following commit has been merged into the core/rcu branch of tip:
Commit-ID: f8466f94685b5bd931384526cf51e090fd2ac706
Gitweb: https://git.kernel.org/tip/f8466f94685b5bd931384526cf51e090fd2ac706
Author: Paul E. McKenney <paulmck@...nel.org>
AuthorDate: Sun, 03 May 2020 19:16:09 -07:00
Committer: Paul E. McKenney <paulmck@...nel.org>
CommitterDate: Mon, 29 Jun 2020 11:58:49 -07:00
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@...nel.org>
---
kernel/rcu/update.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/rcu/update.c b/kernel/rcu/update.c
index f5a82e1..ca17b77 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);
Powered by blists - more mailing lists