[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201123121439.GD9464@X58A-UD3R>
Date: Mon, 23 Nov 2020 21:14:39 +0900
From: Byungchul Park <byungchul.park@....com>
To: torvalds@...ux-foundation.org, peterz@...radead.org,
mingo@...hat.com, will@...nel.org
Cc: linux-kernel@...r.kernel.org, tglx@...utronix.de,
rostedt@...dmis.org, joel@...lfernandes.org,
alexander.levin@...rosoft.com, daniel.vetter@...ll.ch,
chris@...is-wilson.co.uk, duyuyang@...il.com,
johannes.berg@...el.com, tj@...nel.org, tytso@....edu,
willy@...radead.org, david@...morbit.com, amir73il@...il.com,
bfields@...ldses.org, gregkh@...uxfoundation.org,
kernel-team@....com
Subject: Re: [RFC] Dept(Dependency Tracker) Report Example
On Mon, Nov 23, 2020 at 08:13:32PM +0900, Byungchul Park wrote:
> [ 0.995081] ===================================================
> [ 0.995619] Dept: Circular dependency has been detected.
> [ 0.995816] 5.9.0+ #8 Tainted: G W
> [ 0.996493] ---------------------------------------------------
> [ 0.996493] summary
> [ 0.996493] ---------------------------------------------------
> [ 0.996493] *** AA DEADLOCK ***
> [ 0.996493]
> [ 0.996493] context A
> [ 0.996493] [S] __mutex_lock(&dev->mutex:0)
> [ 0.996493] [W] __mutex_lock(&dev->mutex:0)
> [ 0.996493] [E] __mutex_unlock(&dev->mutex:0)
> [ 0.996493]
> [ 0.996493] [S]: start of the event context
> [ 0.996493] [W]: the wait blocked
> [ 0.996493] [E]: the event not reachable
Let me explain what [S], [W] and [E] mean using example:
1. In the case of typical locks:
if condition a
lock(&a); <- [S] start of the event context for the event, unlock(&a)
[W] wait as well
...
unlock(&a); <- [E] event to someone who has been waiting lock &a to
be released
else
lock(&b); <- [S] start of the event context for the event, unlock(&b)
[W] wait as well
...
unlock(&b); <- [E] event to someone who has been waiting lock &b to
be released
2. In the case of general wait and event:
THREAD 1
trigger_the_event_context_to_go();
...
wait_for_something(&c); <- [W] wait
store_timestamp();
THREAD 2
notice_someone_triggered_me();
...
(somewhere can see the timestamp of wait_for_something(&c) in THREAD 1)
<- [S] start of the event context for the event, do_something(&c)
...
do_something(&c); <- [E] event the wait is waiting for in THREAD 1
Thanks,
Byungchul
Powered by blists - more mailing lists