From: Matthew Wilcox <willy@debian.org>
To: linux-kernel@vger.kernel.org
Cc: linux-fsdevel@vger.kernel.org
Subject: RFC: No more deadlock detection for POSIX locks
Date: Thu, 10 Oct 2002 21:42:33 +0100 [thread overview]
Message-ID: <20021010214233.G18545@parcelfarce.linux.theplanet.co.uk> (raw)
The deadlock detection for posix locks really isn't worth anything
any more. It was always slightly dubious, since a parent/child could
remove each other's locks (thanks, POSIX!). But now it's really dubious
since we store the TID, not the PID of the requesting process, and any
thread can unlock a lock set by another thread.
Here's one situation in which it can falsely return -EDEADLK:
TID 1001, PID 1002 takes lock A
TID 1003, PID 1004 takes lock B
TID 1001, PID 1005 takes lock B, blocks
TID 1003, PID 1004 takes lock A, gets -EDEADLK.
Even though (1001,1002) isn't blocking on any lock and will release lock A
in the future.
So how about we just delete the nasty deadlock detection code? I've never
been fond of the user-triggerable O(N^2) algorithm, and we're permitted
to not implement it (POSIX suggests applications set a timer to detect
deadlock themselves, so anyone writing a portable application is already
doing this).
Objections?
--
Revolutions do not require corporate support.
reply other threads:[~2002-10-10 20:36 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20021010214233.G18545@parcelfarce.linux.theplanet.co.uk \
--to=willy@debian.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.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
all inboxes | Powered by JetHome®