From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Matthew Wilcox <willy@debian.org>,
Stephen Rothwell <sfr@canb.auug.org.au>,
Andrew Morton <akpm@osdl.org>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: Killing POSIX deadlock detection
Date: Sun, 06 Jun 2004 16:52:27 -0400 [thread overview]
Message-ID: <1086555145.7635.22.camel@lade.trondhjem.org> (raw)
In-Reply-To: <m165a4phy9.fsf@ebiederm.dsl.xmission.com>
På su , 06/06/2004 klokka 16:09, skreiv Eric W. Biederman:
> Trond Myklebust <trond.myklebust@fys.uio.no> writes:
>
> > På su , 06/06/2004 klokka 09:27, skreiv Matthew Wilcox:
> > \
> > > > T1 locks file F1 -> lock (P1, F1)
> > > > P2 locks file F2 -> lock (P2, F2)
> > > > P2 locks file F1 -> blocks against (P1, F1)
> > > > T1 locks file F2 -> blocks against (P2, F2)
> > >
> > > Less contrived example -- T2 locks file F2. We report deadlock here too,
> > > even though T1 is about to unlock file F1.
>
> There is a fairly sane linux specific definition here. We should
> track these things not by pid or tid, but by struct files_struct.
RTFC... Look carefully in fs/locks.c at stuff like posix_same_owner().
We currently use both the tgid and the struct files_struct (although
there are a few notable bugs where we only check the one or the
other)...
That is, however, a definition which breaks the SUS standards, and it
therefore ends up introducing pathologies such as the steal_locks crap.
struct files_struct is NOT a sane basis for tracking locks.
> > Yes: As Chuck points out, that is a fairly nasty change of the userland
> > API.
>
> ???? Failing to detect a deadlock is not a change in the API.
> It is simply a change in behavior.
It is a change in functionality from one where potential deadlocks are
detected and reported as errors to one where deadlocks are suddenly
possible. Are you saying that functionality is not a part of the API?
> Perhaps what we should do is simply not attempt to detect deadlocks
> involving threaded processes.
So how do you define (and detect) a threaded process?
Trond
next prev parent reply other threads:[~2004-06-06 20:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200406050725.i557P3hQ004052@supreme.pcug.org.au>
[not found] ` <20040606130422.0c8946b3.sfr@canb.auug.org.au>
2004-06-06 13:27 ` Killing POSIX deadlock detection Matthew Wilcox
2004-06-06 19:49 ` Trond Myklebust
2004-06-06 20:09 ` Eric W. Biederman
2004-06-06 20:52 ` Trond Myklebust [this message]
2004-06-06 15:24 Lever, Charles
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=1086555145.7635.22.camel@lade.trondhjem.org \
--to=trond.myklebust@fys.uio.no \
--cc=akpm@osdl.org \
--cc=ebiederm@xmission.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
--cc=willy@debian.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