From: "J. Bruce Fields" <bfields@fieldses.org>
To: Matthew Wilcox <willy@linux.intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Jonathan Corbet <corbet@lwn.net>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Ingo Molnar <mingo@elte.hu>, Al Viro <viro@ZenIV.linux.org.uk>,
Alessio Igor Bogani <abogani@texware.it>,
Alexander Viro <viro@ftp.linux.org.uk>,
Frederic Weisbecker <fweisbec@gmail.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -tip] remove the BKL: Replace BKL in mount/umount syscalls with a mutex
Date: Wed, 22 Apr 2009 13:28:15 -0400 [thread overview]
Message-ID: <20090422172815.GA9541@fieldses.org> (raw)
In-Reply-To: <20090417184431.GB3719@linux.intel.com>
On Fri, Apr 17, 2009 at 11:44:31AM -0700, Matthew Wilcox wrote:
> On Fri, Apr 17, 2009 at 11:03:31AM -0700, Linus Torvalds wrote:
> > Hmm. It might also just be my fevered imagination. I'd like to say it was
> > Matthew Wilcox, but really, my mind is going.
> >
> > Ahh. Bug google backs me up. As long as I have google, I can keep
> > Alzheimer's at bay: "Negative scalability by removal of lock_kernel()"
> > thread on lkml back in October 2000. After we had actually done the BKL
> > removal.
> >
> > So we actually did apply it (in 2.4.0-test9, and then reverted it again
> > (in -test11, I think). Google for "file_lock_sem fs/locks.c" and see some
> > of the discussion. The end result was to go back to the BKL due to Apache
> > slowdowns.
>
> That's some good ancient history ;-) It probably would make sense to
> use a mutex rather than the BKL these days now that we spin on mutexes
> if the other process is running. Plus, I don't think modern Apache uses
> file locks any more.
>
> There was another attempt to remove the BKL from locks.c by Dave Hansen
> a few years later. That one foundered on the proposed locking scheme
> being unadulterated crap; I seem to remember pointing out that it was
> gathering O(n^2) locks ...
>
> > But I seem to remember a later patch (in the last year or two) from Willy
> > too. Google doesn't help me, so that's probably just my fevered mind. But
> > I'm cc'ing Willy anyway.
>
> Fortunately, this patch wasn't the product of a fevered anything. It
> was in response to the performance regressions I introduced by
> introducing the generic semaphores that were too fair.
>
> It didn't deal with the really knotty problem which was the NFS server
> still running under the BKL and relying on the BKL to prevent other
> CPUs from messing with the list of locks.
It's only lockd that actually runs *entirely* under the BKL--and lockd
obviously has a close relationship with the locks.c code, so there's a
fear of (unknown) dependencies there.
Also, more concretely (and what you probably had in mind), there are a
couple places where the nfs client or server explicitly take the bkl
just to traverse the lock list.
> Since the problem turned out to be the TTY layer and not the file
> locking code, we just dropped the patch, but if we'd like to resurrect
> it again, we need to talk to the NFS folks. Probably Bruce Fields is
> the appropriate sucker.
I've been saying for a while I'd look into this, but keep getting
distracted, apologies.... I'll see if I can at least deal with the
obvious nfs client/server lock list traversals this time around.
--b.
next prev parent reply other threads:[~2009-04-22 17:29 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-16 14:27 [PATCH -tip] remove the BKL: Replace BKL in mount/umount syscalls with a mutex Alessio Igor Bogani
2009-04-16 14:36 ` Christoph Hellwig
2009-04-16 16:49 ` Ingo Molnar
2009-04-16 17:01 ` Christoph Hellwig
2009-04-16 17:13 ` Ingo Molnar
2009-04-17 0:05 ` Al Viro
2009-04-16 16:06 ` Ingo Molnar
2009-04-16 16:58 ` Ingo Molnar
2009-04-16 23:56 ` Al Viro
2009-04-17 0:01 ` Ingo Molnar
2009-04-17 0:13 ` Al Viro
2009-04-17 0:27 ` Ingo Molnar
2009-04-17 0:38 ` Al Viro
2009-04-17 16:56 ` Ingo Molnar
2009-04-17 17:04 ` Peter Zijlstra
2009-04-17 17:21 ` Linus Torvalds
2009-04-17 17:31 ` Jonathan Corbet
2009-04-17 18:03 ` Linus Torvalds
2009-04-17 18:44 ` Matthew Wilcox
2009-04-22 17:28 ` J. Bruce Fields [this message]
2009-04-17 18:08 ` Al Viro
2009-04-17 18:34 ` Ingo Molnar
2009-04-17 17:41 ` Al Viro
2009-04-17 17:34 ` Al Viro
2009-04-16 23:49 ` Al Viro
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=20090422172815.GA9541@fieldses.org \
--to=bfields@fieldses.org \
--cc=a.p.zijlstra@chello.nl \
--cc=abogani@texware.it \
--cc=corbet@lwn.net \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=torvalds@linux-foundation.org \
--cc=viro@ZenIV.linux.org.uk \
--cc=viro@ftp.linux.org.uk \
--cc=willy@linux.intel.com \
/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