Skip to contentSkip to conversation

locking/lockdep: add debug_show_all_lock_holders()

PATCH Tetsuo Handa 1 participant 1 message Apr 26, 2023 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Ingo or Peter, can we make progress on this patch?
Linus wants this patch be handled by locking people, if this patch is acceptable.

https://lkml.kernel.org/r/CAHk-=wjbu9USn=hVWQ9v9t1H+8R6qXj8REkm36==w10zM0cM6g@mail.gmail.com

Quoted 27 lines · Hillf Danton
Quoted 4 lines

When check_hung_uninterruptible_tasks() reports a thread waiting for a lock, it is important to report backtrace of threads which already held that lock. Therefore, allow check_hung_uninterruptible_tasks() to report the exact location of threads which is holding any lock.

Yeah more info should have been printed for udevd/5109 to help work out the cause of task hung [1].

[1] https://lore.kernel.org/lkml/[email protected]/

Quoted 7 lines

debug_show_all_lock_holders() skips current thread if the caller is holding no lock, for reporting RCU lock taken inside that function is generally useless.

---

Quoted 8 lines

I couldn't catch Peter's question at
https://lkml.kernel.org/r/[email protected] . I consider that this patch as-is is helpful, for not all TASK_RUNNING threads are actually running on some CPU, aren't they? If we show backtrace of only TASK_RUNNING threads which are running on some CPU, we fail to get hints for TASK_RUNNING threads which are not running on some CPU. Therefore, I consider that showing backtrace of TASK_RUNNING threads which are not running on some CPU is better than not showing.