From: Thomas Gleixner <tglx@linutronix.de>
To: Esben Nielsen <simlo@phys.au.dk>
Cc: Ingo Molnar <mingo@elte.hu>, linux-kernel@vger.kernel.org
Subject: Re: PI patch against 2.6.16-rt9
Date: Wed, 29 Mar 2006 00:42:06 +0200 [thread overview]
Message-ID: <1143585726.5344.238.camel@localhost.localdomain> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0603282313050.22822-100000@lifa02.phys.au.dk>
On Tue, 2006-03-28 at 23:23 +0100, Esben Nielsen wrote:
> > If you get to L(x) the underlying dependencies might have changed
> > already as well as the dependencies x ... n. We might get false
> > positives in the deadlock detection that way, as a deadlock is an
> > "atomic" state.
>
> As I see it you might detect a circular lock graph "atomically". But is
> that a "deadlock"? Yes, if you rule out signals and timeouts, this
> situation does indeed deadlock your program.
>
> But if you count in signals and timeouts your algoritm also gives "false
> positives": You can detect a circular lock but when you return from
> rt_mutex_slowlock(), a signal is delivered and there is no longer a
> circular dependency and most important: The program wouldn't be
> deadlocked even if you didn't ask for deadlock detection and your task in
> that case would block.
>
> I would like to see an examble of a false deadlock. I don't rule them out
> in the present code. But they might be simple to fix.
Simply the initial lock chain is L1->L2->L3->L4, which is no deadlock.
Now in the course of your lock dropping L2 gets removed while you are at
L3 and L5 gets added on top of L4. You follow the chain blindly and
detect a dealock vs. L5, but its not longer valid. The L2 cleanup is
blocked by yourself. There is no way to prevent this with your method.
Your method is tempting, but I do not see how it works out right now.
tglx
next prev parent reply other threads:[~2006-03-28 22:41 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-26 23:42 PI patch against 2.6.16-rt9 Esben Nielsen
2006-03-26 23:47 ` Ingo Molnar
2006-03-27 0:07 ` Esben Nielsen
2006-03-27 0:11 ` Esben Nielsen
2006-03-27 0:21 ` Ingo Molnar
2006-03-27 15:00 ` Esben Nielsen
2006-03-27 23:05 ` Esben Nielsen
2006-03-28 21:02 ` Ingo Molnar
2006-03-28 20:55 ` Ingo Molnar
2006-03-28 21:17 ` Esben Nielsen
2006-03-28 21:24 ` Ingo Molnar
2006-03-28 22:51 ` Esben Nielsen
2006-03-29 7:14 ` Ingo Molnar
2006-03-29 7:59 ` Esben Nielsen
2006-03-29 12:35 ` Ingo Molnar
2006-03-28 21:36 ` Thomas Gleixner
2006-03-28 22:23 ` Esben Nielsen
2006-03-28 22:42 ` Thomas Gleixner [this message]
2006-03-28 23:34 ` Esben Nielsen
2006-03-28 23:59 ` Thomas Gleixner
2006-03-29 12:29 ` Ingo Molnar
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=1143585726.5344.238.camel@localhost.localdomain \
--to=tglx@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=simlo@phys.au.dk \
/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