[lkml]   [2010]   [Sep]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] Remove BKL from fs/locks.c
On Tue, Sep 14, 2010 at 05:55:56PM -0400, Trond Myklebust wrote:
> On Tue, 2010-09-14 at 23:24 +0200, Arnd Bergmann wrote:
> > On Tuesday 14 September 2010 22:53:31 Linus Torvalds wrote:
> > > Oh well. I guess there's no incremental way to do things sanely. And
> > > nobody has patches to fix those users, I guess.
> >
> > The only critical user is fs/lockd, I can easily handle the rest.
> > When I talked to Bruce and Trond during LinuxCon, they told me that
> > it should be possible to separate the bits of fs/lockd that lock
> > against fs/locks.c and convert the former to use lock_flocks().
> The NFSv4 client is quite ready to just switch to using lock_flocks()
> now. There is nothing that depends on the magical properties of the BKL.
> I do also have someone working on BKL removal for the NLM/lockd client
> and am hoping that should be ready in a couple of weeks time.
> The timeline for the server is up to Bruce, however.

Looking over the server code.... The only code I see under the BKL is:

- a few lease callbacks in fs/nfsd/nfs4state.c, none of which
sleep at this point, so all should be fine under a spinlock or
whatever we want.
- fs/nfsd/nfs4state.c:check_for_locks(), which explicitly takes
the BKL itself. All it does, though, is walk the lock list
for a given file and check whether any of them have a given
owner. It would be trivial to put it under some other lock
and/or move it to locks.c.


 \ /
  Last update: 2010-09-15 22:47    [W:0.079 / U:3.260 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site