From: "tip-bot2 for Waiman Long" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Waiman Long <longman@redhat.com>,
"Peter Zijlstra (Intel)" <peterz@infradead.org>,
Ingo Molnar <mingo@kernel.org>, x86 <x86@kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: [tip: locking/core] locking/lockdep: Display irq_context names in /proc/lockdep_chains
Date: Tue, 11 Feb 2020 12:48:25 -0000 [thread overview]
Message-ID: <158142530591.411.8801852288314331385.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20200206152408.24165-3-longman@redhat.com>
The following commit has been merged into the locking/core branch of tip:
Commit-ID: b9875e9882295749a14b31e16dd504ae904cf070
Gitweb: https://git.kernel.org/tip/b9875e9882295749a14b31e16dd504ae904cf070
Author: Waiman Long <longman@redhat.com>
AuthorDate: Thu, 06 Feb 2020 10:24:04 -05:00
Committer: Ingo Molnar <mingo@kernel.org>
CommitterDate: Tue, 11 Feb 2020 13:10:48 +01:00
locking/lockdep: Display irq_context names in /proc/lockdep_chains
Currently, the irq_context field of a lock chains displayed in
/proc/lockdep_chains is just a number. It is likely that many people
may not know what a non-zero number means. To make the information more
useful, print the actual irq names ("softirq" and "hardirq") instead.
Signed-off-by: Waiman Long <longman@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lkml.kernel.org/r/20200206152408.24165-3-longman@redhat.com
---
kernel/locking/lockdep_proc.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/kernel/locking/lockdep_proc.c b/kernel/locking/lockdep_proc.c
index 231684c..c222438 100644
--- a/kernel/locking/lockdep_proc.c
+++ b/kernel/locking/lockdep_proc.c
@@ -128,6 +128,13 @@ static int lc_show(struct seq_file *m, void *v)
struct lock_chain *chain = v;
struct lock_class *class;
int i;
+ static const char * const irq_strs[] = {
+ [0] = "0",
+ [LOCK_CHAIN_HARDIRQ_CONTEXT] = "hardirq",
+ [LOCK_CHAIN_SOFTIRQ_CONTEXT] = "softirq",
+ [LOCK_CHAIN_SOFTIRQ_CONTEXT|
+ LOCK_CHAIN_HARDIRQ_CONTEXT] = "hardirq|softirq",
+ };
if (v == SEQ_START_TOKEN) {
if (nr_chain_hlocks > MAX_LOCKDEP_CHAIN_HLOCKS)
@@ -136,7 +143,7 @@ static int lc_show(struct seq_file *m, void *v)
return 0;
}
- seq_printf(m, "irq_context: %d\n", chain->irq_context);
+ seq_printf(m, "irq_context: %s\n", irq_strs[chain->irq_context]);
for (i = 0; i < chain->depth; i++) {
class = lock_chain_get_class(chain, i);
next prev parent reply other threads:[~2020-02-11 12:48 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-06 15:24 [PATCH v6 0/6] locking/lockdep: Reuse zapped chain_hlocks entries Waiman Long
2020-02-06 15:24 ` [PATCH v6 1/6] locking/lockdep: Decrement irq context counters when removing lock chain Waiman Long
2020-02-11 12:48 ` [tip: locking/core] locking/lockdep: Decrement IRQ " tip-bot2 for Waiman Long
2020-02-06 15:24 ` [PATCH v6 2/6] locking/lockdep: Display irq_context names in /proc/lockdep_chains Waiman Long
2020-02-11 12:48 ` tip-bot2 for Waiman Long [this message]
2020-02-06 15:24 ` [PATCH v6 3/6] locking/lockdep: Track number of zapped classes Waiman Long
2020-02-11 12:48 ` [tip: locking/core] " tip-bot2 for Waiman Long
2020-02-06 15:24 ` [PATCH v6 4/6] locking/lockdep: Throw away all lock chains with zapped class Waiman Long
2020-02-11 12:48 ` [tip: locking/core] " tip-bot2 for Waiman Long
2020-02-06 15:24 ` [PATCH v6 5/6] locking/lockdep: Track number of zapped lock chains Waiman Long
2020-02-11 12:48 ` [tip: locking/core] " tip-bot2 for Waiman Long
2020-02-06 15:24 ` [PATCH v6 6/6] locking/lockdep: Reuse freed chain_hlocks entries Waiman Long
2020-02-06 16:03 ` Peter Zijlstra
2020-02-06 17:06 ` Waiman Long
2020-02-06 16:16 ` Peter Zijlstra
2020-02-06 17:08 ` Waiman Long
2020-02-06 17:31 ` Peter Zijlstra
2020-02-11 12:48 ` [tip: locking/core] " tip-bot2 for Waiman Long
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=158142530591.411.8801852288314331385.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=longman@redhat.com \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).