From: Peter Zijlstra <peterz@infradead.org>
To: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>, LKML <linux-kernel@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ming Lei <tom.leiming@gmail.com>,
Gautham R Shenoy <ego@in.ibm.com>
Subject: Re: [PATCH 1/2] lockdep: Include recursive read-locks dependencies in the tree
Date: Wed, 18 Nov 2009 11:26:05 +0100 [thread overview]
Message-ID: <1258539965.3918.194.camel@laptop> (raw)
In-Reply-To: <1258506398-5151-2-git-send-email-fweisbec@gmail.com>
On Wed, 2009-11-18 at 02:06 +0100, Frederic Weisbecker wrote:
> Currently, recursive read locks are checked in two ways:
>
> - walk through the locks held by the current task and check possible
> deadlock.
>
> - if the recursive read lock is not already present in the lock held
> by the current task, check its dependencies against the tree.
>
> But this recursive read lock will never be added to the tree of
> dependencies. It means that the following sequence:
>
> A = rwlock (Ar: taken as read recursive, Aw: taken as write)
> B = normal lock
>
> Ar -> B
> B -> Aw
>
> won't ever be detected as a lock inversion.
> This patch fixes it by inserting the recursive read locks into the
> tree of dependencies and enhancing the circular checks (check the
> class and the read attribute collision).
There were some very funny corner cases with IRQ state vs recursive
locks, I don't seen any of that mentioned here.
Bot ego and I poked at it at various times, but neither of us managed to
actually finish it due to getting distracted with other bits I guess.
http://programming.kicks-ass.net/kernel-patches/cpu-hotplug/
http://lkml.org/lkml/2009/5/11/203
next prev parent reply other threads:[~2009-11-18 10:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-18 1:06 [PATCH 0/2] lockdep: Improvements for rwlocks dependency inversion detection Frederic Weisbecker
2009-11-18 1:06 ` [PATCH 1/2] lockdep: Include recursive read-locks dependencies in the tree Frederic Weisbecker
2009-11-18 10:26 ` Peter Zijlstra [this message]
2009-11-19 16:07 ` Frederic Weisbecker
2009-11-18 1:06 ` [PATCH 2/2] lockdep: Don't only check recursive read locks once in a sequence Frederic Weisbecker
2009-11-18 9:43 ` Lai Jiangshan
2009-11-19 15:55 ` Frederic Weisbecker
2009-11-19 17:13 ` Peter Zijlstra
2009-11-20 0:57 ` Frederic Weisbecker
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=1258539965.3918.194.camel@laptop \
--to=peterz@infradead.org \
--cc=ego@in.ibm.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
--cc=tom.leiming@gmail.com \
/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
Powered by JetHome