[lkml]   [2009]   [Dec]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [GIT PATCH] TTY patches for 2.6.33-git
On Sun, 2009-12-13 at 11:19 -0800, Linus Torvalds wrote: 
> On Sun, 13 Dec 2009, Trond Myklebust wrote:
> > On Sun, 2009-12-13 at 20:04 +0100, Frederic Weisbecker wrote:
> > > In the above cases we have the following comment:
> > >
> > > /* Protect inode->i_flock using the BKL */
> > >
> > > And really it doesn't seem to protect anything else,
> > > fortunately it is acquired in a short path.
> >
> > As I said in my reply, this is the tough one, because the BKL protection
> > is imposed by the VFS locking scheme used in fs/locks.c.
> >
> > There is a similar dependency imposed upon fs/lockd/
> Note that since NFS seems to be the only one who really cares, I think the
> appropriate course of action is to just replace the BKL - preferably with
> a spinlock that you just drop before you do anything that blocks.
> Not only does the BKL already do that (so the locking doesn't change), but
> I think most _users_ of the BKL actually already do the explicit dropping
> of the lock (rather than the implicit one done by schedule()) because it's
> already been a scalability issue and we've had some history of trying
> alternative approaches that didn't do that whole auto-dropping anyway
> (whether those alternate approaches be semaphores or spinlocks).
> So don't worry about the "imposed by the VFS" thing. I think you can
> fairly easily change the VFS side.

That comment applies to the NFSv4 code, which applies the BKL only
because we need to traverse the inode->i_flock list. There is no
recursive use of the BKL there, and we can trivially replace it with
whichever new lock that that is chosen to replace the BKL in fs/locks.c.

To fix the lockd module, we have to backport some of the lessons we
learned when writing the NFSv4 file locking code. It won't be a huge
job, but I'd feel uncomfortable if I were to do it in a hurry just in
order to meet the merge window deadline.


 \ /
  Last update: 2009-12-13 21:07    [W:0.096 / U:8.088 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site