On Tue, Jan 15, 2008 at 08:04:47AM -0700, Matthew Wilcox wrote:
> On Tue, Jan 15, 2008 at 09:48:51AM -0500, J. Bruce Fields wrote:
> > On Mon, Jan 14, 2008 at 09:28:30PM -0700, Matthew Wilcox wrote:
> > > interruptible_sleep_on_locked() is just an open-coded
> > > wait_event_interruptible_timeout() with a few assumptions since we know
> > > we hold the BKL.  locks_block_on_timeout() is only used in one place, so
> > > it's actually simpler to inline it into its caller.
> > 
> > Makes sense, thanks.  So the assumption we were depending on the BKL for
> > was that we could count on the wake-up not coming till after we block,
> > so we could skip a check ->fl_next that's normally needed to resolve the
> > usual sleeping-on-some-condition race?
> 
> That's right.

OK, thanks, applied just with the "few assumptions" replaced by a
description of that particular problem:

        "interruptible_sleep_on_locked() is just an open-coded
        wait_event_interruptible_timeout(), with the one difference that
        interruptible_sleep_on_locked() doesn't bother to check the
        condition on which it waits, depending instead on the BKL to
        avoid the case where it blocks after the wakeup has already been
        called.

        locks_block_on_timeout() is only used in one place, so it's
        actually simpler to inline it into its caller."

Pending locks patches available from:

        git://linux-nfs.org/~bfields/linux.git locks


--b.
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to