From: Ingo Molnar <mingo@kernel.org>
To: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: Boqun Feng <boqun@kernel.org>, Gary Guo <gary@garyguo.net>,
Mark Brown <broonie@kernel.org>,
linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
Miguel Ojeda <ojeda@kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
peterz@infradead.org, will@kernel.org, longman@redhat.com,
gregkh@linuxfoundation.org,
syzkaller <syzkaller@googlegroups.com>,
Theodore Tso <tytso@mit.edu>
Subject: Re: [PATCH -v2] lockdep: Enable the printing of held locks of remote running tasks and print task CPU
Date: Wed, 8 Jul 2026 10:37:43 +0200 [thread overview]
Message-ID: <ak4MV48dg-OePgG2@gmail.com> (raw)
In-Reply-To: <90133e2c-60aa-456f-b2a8-d0af19b02395@I-love.SAKURA.ne.jp>
* Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> wrote:
> On 2026/07/07 16:20, Ingo Molnar wrote:
> > TL;DR: it should be fine to print the held locks of running
> > tasks too, as long as we print out a warning when we print
> > such a task, so that users are aware of any racy output.
>
> Is there a warning we print out?
> We dropped WARNING: in this version, didn't we?
Indeed - I fixed the changelog.
> > Finally, print out the last CPU a task has ran on. This is very
> > useful information for races and for locking bugs in particular.
> > This basically extends the 'on CPU#%d' message we print for
> > running tasks to all tasks we print.
>
> I like this change. Thank you. ;-)
>
> # echo t > /proc/sysrq-trigger; sleep 3; dmesg -c | cut -b 15-
>
> Before:
>
> Showing all locks held in the system:
> 4 locks held by pr/legacy/16:
> 1 lock held by rcub/1/18:
> #0: ffffffff92ba36c8 (rcu_state){+.+.}-{0:0}, at: rcu_boost_kthread+0x15c/0x5d0
> 3 locks held by bash/1221:
> #0: ffff8cd5dd8df500 (sb_writers#3){.+.+}-{0:0}, at: ksys_write+0x9a/0x150
> #1: ffffffff92b9e080 (rcu_read_lock){....}-{1:3}, at: __handle_sysrq+0x56/0x140
> #2: ffffffff92b9e080 (rcu_read_lock){....}-{1:3}, at: debug_show_all_locks+0x3d/0x184
>
> After:
>
> Showing all locks held in the system:
> locks held by pr/legacy/16: 4, last CPU#0:
> #0: ffffffffaaf9a4a0 (console_lock){+.+.}-{0:0}, at: legacy_kthread_func+0x85/0x190
> #1: ffffffffaaf9a4f8 (console_srcu){....}-{0:0}, at: console_flush_one_record+0x92/0x710
> #2: ffffffffab1fb818 (printing_lock){+.+.}-{3:3}, at: vt_console_print+0x74/0x640
> #3: ffffffffaaf9e080 (rcu_read_lock){....}-{1:3}, at: rt_spin_trylock+0x61/0x140
> locks held by rcub/1/18: 1, on CPU#0:
> #0: ffffffffaafa36c8 (rcu_state){+.+.}-{0:0}, at: rcu_boost_kthread+0x15c/0x5d0
> locks held by bash/1206: 3, last CPU#0:
> #0: ffff8c62894da500 (sb_writers#3){.+.+}-{0:0}, at: ksys_write+0x9a/0x150
> #1: ffffffffaaf9e080 (rcu_read_lock){....}-{1:3}, at: __handle_sysrq+0x56/0x140
> #2: ffffffffaaf9e080 (rcu_read_lock){....}-{1:3}, at: debug_show_all_locks+0x3d/0x184
Great, and you are welcome.
I've added your Tested-by tag as well, and graduated the updated
commit to tip:locking/core, to be merged into v7.3 if everything
goes fine.
Thanks,
Ingo
next prev parent reply other threads:[~2026-07-08 8:37 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-02 11:49 Policy regarding linux-next only changes Gary Guo
2026-07-02 12:49 ` Tetsuo Handa
2026-07-02 13:37 ` Miguel Ojeda
2026-07-02 14:11 ` Boqun Feng
2026-07-04 10:14 ` Tetsuo Handa
2026-07-04 12:06 ` Miguel Ojeda
2026-07-04 13:22 ` Theodore Tso
2026-07-05 11:36 ` Tetsuo Handa
2026-07-05 12:02 ` Miguel Ojeda
2026-07-05 12:06 ` Miguel Ojeda
2026-07-05 12:20 ` Mark Brown
2026-07-05 12:06 ` Mark Brown
2026-07-05 14:16 ` Tetsuo Handa
2026-07-06 17:23 ` Mark Brown
2026-07-05 9:05 ` [PATCH] lockdep: Enable the printing of held locks of running non-current tasks (was: Policy regarding linux-next only changes) Ingo Molnar
2026-07-05 11:05 ` [PATCH] lockdep: Enable the printing of held locks of running non-current tasks Tetsuo Handa
2026-07-07 7:20 ` [PATCH -v2] lockdep: Enable the printing of held locks of remote running tasks and print task CPU Ingo Molnar
2026-07-07 13:10 ` Tetsuo Handa
2026-07-08 8:37 ` Ingo Molnar [this message]
2026-07-07 7:21 ` [tip: locking/debug] " tip-bot2 for Ingo Molnar
2026-07-08 8:41 ` [tip: locking/core] " tip-bot2 for Ingo Molnar
2026-07-05 14:59 ` Policy regarding linux-next only changes Boqun Feng
2026-07-02 13:22 ` Mark Brown
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=ak4MV48dg-OePgG2@gmail.com \
--to=mingo@kernel.org \
--cc=boqun@kernel.org \
--cc=broonie@kernel.org \
--cc=gary@garyguo.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=longman@redhat.com \
--cc=ojeda@kernel.org \
--cc=penguin-kernel@i-love.sakura.ne.jp \
--cc=peterz@infradead.org \
--cc=syzkaller@googlegroups.com \
--cc=torvalds@linux-foundation.org \
--cc=tytso@mit.edu \
--cc=will@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