[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFxmeTp1L19Bnn4fjhyPvjQUMkfP2+KAgAcWoY6Uxrz41w@mail.gmail.com>
Date: Tue, 17 Feb 2015 11:29:56 -0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: "J. Bruce Fields" <bfields@...ldses.org>
Cc: Jeff Layton <jlayton@...chiereds.net>,
"Kirill A. Shutemov" <kirill@...temov.name>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Christoph Hellwig <hch@....de>,
Dave Chinner <david@...morbit.com>,
Sasha Levin <sasha.levin@...cle.com>
Subject: Re: [GIT PULL] please pull file-locking related changes for v3.20
On Tue, Feb 17, 2015 at 11:13 AM, Linus Torvalds
<torvalds@...ux-foundation.org> wrote:
>
> That said, I'm not at all sure about the "we're stuck with it". We can
> improve the semantics without anybody noticing, because it's not like
> anybody could *depend* on the weaker semantics - they needed
> particular races and timings to hit anyway.
.. that said, it's true that we cannot do the FILE_LOCK_DEFERRED thing
for multiple blockers that already hold a lock. One of them has to
release its lock for other lockers to make progress. So I guess the
weak model of dropping a read lock before taking a write lock is
actually required.
That sleep in the middle with dropping the lock is still complete
crap, though. You can't do it. If you drop the lock, you have to
repeat the while cycle, not just sleep and continue.
Or just go to sleep, waiting for the conflicting lock to also be dropped.
So maybe just removing that whole "if (found) { reschedule }" - but
leaving the "drop early - is the right thing to do.
Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists