From: Ingo Molnar <mingo@elte.hu>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
Andi Kleen <andi@firstfloor.org>,
linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Thomas Gleixner <tglx@linutronix.de>,
Alexander Viro <viro@ftp.linux.org.uk>
Subject: Re: [announce] "kill the Big Kernel Lock (BKL)" tree
Date: Thu, 15 May 2008 10:02:11 +0200 [thread overview]
Message-ID: <20080515080211.GA14821@elte.hu> (raw)
In-Reply-To: <alpine.LFD.1.10.0805141435540.3019@woody.linux-foundation.org>
* Linus Torvalds <torvalds@linux-foundation.org> wrote:
> On Wed, 14 May 2008, Alan Cox wrote:
> >
> > That in itself is a problem Ingo's stuff won't help with: We have
> > lots of "magic" accidental, undocumented and pot luck BKL locking
> > semantics between subsystems that are not even visible.
>
> The good news is that I suspect they are going away. It probably is
> mainly tty and /proc by now, and /proc is pretty close to done.
>
> It's hard to have too many inter-module dependencies when most of the
> core modules no longer even take the kernel lock any more.
yeah. And Alan has a good point: there _is_ lots of magic stuff
happening below the BKL. One of them are the BKL <-> other lock
dependencies. My stuff helps with mapping that part of the magic: it
turns the BKL into an ordinary mutex and thus integrates it into
lockdep's existing dependency validation machinery.
In other words: this stuff makes BKL validation _stronger_, not weaker,
and hence it ultimately helps its mapping and elimination. It turns the
"magic" into something more concrete.
It might not help with other magic directly - but it helps indirectly,
because now the "magic" has shrunk, so there's more attention and more
resources available to fix it in the places where the magic hurts. (And
suggestions are welcome for more debug helpers to make more magic more
visible.)
Whenever someone narrows the BKL's scope, that will always have to be
done carefully - and that's true of any other lock. This patchset
(except perhaps the boot bits) does not narrow the BKL's scope.
It will still be no doubt a tough job (reducing/changing locking of
_any_ locked path is a tough job), but it will now fit into our existing
practices much better and we'll get various reminders from lockdep and
the other debug helpers when we forgot about some detail.
Before this there was almost zero feedback from the kernel when
something around the BKL broke: pretty much the only remainder we had
from incorrect BKL elimination were subtle breakages.
And my personal experience might matter as well: before this i never
dared to touch BKL code. I once removed _all_ BKL locking from all the
kernel _by accident_ [i typoed a single line in lib/smp_lock.c] and ran
it on my main desktop for about a day and never noticed a thing - until
a few weird TTY messages popped up in the syslog...
But with this scheme, i felt _much_ more secure about touching BKL code,
and kicking the BKL from the scheduler was pure joy i have to say. (even
though it will of course remain in the upstream scheduler until we are
reasonably sure about the stability of this whole kill-the-BKL approach)
I'm sure other subsystem maintainers will have a similar experience.
Ingo
next prev parent reply other threads:[~2008-05-15 8:03 UTC|newest]
Thread overview: 78+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-14 17:49 Ingo Molnar
2008-05-14 18:30 ` Andi Kleen
2008-05-14 21:00 ` Alan Cox
2008-05-14 21:13 ` Andi Kleen
2008-05-14 21:16 ` H. Peter Anvin
2008-05-14 21:17 ` Alan Cox
2008-05-14 21:19 ` Alan Cox
2008-05-14 21:45 ` Linus Torvalds
2008-05-14 22:03 ` Andi Kleen
2008-05-15 13:34 ` Alan Cox
2008-05-15 14:27 ` Andi Kleen
2008-05-15 15:36 ` Alan Cox
2008-05-16 10:21 ` Andi Kleen
2008-05-15 8:02 ` Ingo Molnar [this message]
2008-05-14 18:41 ` Linus Torvalds
2008-05-14 19:41 ` Ingo Molnar
2008-05-14 20:05 ` Frederik Deweerdt
2008-05-14 21:45 ` Jonathan Corbet
2008-05-14 21:39 ` Alan Cox
2008-05-14 21:56 ` Linus Torvalds
2008-05-14 22:07 ` Jonathan Corbet
2008-05-14 22:14 ` Linus Torvalds
2008-05-22 20:20 ` Alan Cox
2008-05-16 15:44 ` [PATCH, RFC] char dev BKL pushdown Jonathan Corbet
2008-05-16 15:49 ` Christoph Hellwig
2008-05-16 16:03 ` [PATCH] kill empty chardev open/release methods Christoph Hellwig
2008-05-16 16:24 ` Alan Cox
2008-05-16 20:55 ` Alan Cox
2008-05-18 19:46 ` Jonathan Corbet
2008-05-18 19:58 ` Alan Cox
2008-05-16 16:22 ` [PATCH, RFC] char dev BKL pushdown Alan Cox
2008-05-16 16:30 ` Linus Torvalds
2008-05-16 16:43 ` Jonathan Corbet
2008-05-17 21:15 ` Arnd Bergmann
2008-05-18 20:26 ` Jonathan Corbet
2008-05-19 23:07 ` Arnd Bergmann
[not found] ` <200805200111.47275.arnd@arndb.de>
2008-05-19 23:14 ` [PATCH 2/3, RFC] watchdog " Arnd Bergmann
2008-05-20 6:20 ` Christoph Hellwig
2008-05-20 8:30 ` Arnd Bergmann
2008-05-20 15:47 ` Wim Van Sebroeck
2008-05-20 18:31 ` Alan Cox
2008-05-20 21:00 ` Arnd Bergmann
2008-05-22 9:34 ` Alan Cox
2008-05-20 9:08 ` Alan Cox
2008-05-20 8:42 ` Alan Cox
2008-05-19 23:26 ` [PATCH 1/3, RFC] misc char " Arnd Bergmann
2008-05-20 0:07 ` Mike Frysinger
2008-05-20 0:21 ` Jonathan Corbet
2008-05-20 0:46 ` Mike Frysinger
2008-05-20 8:46 ` Alan Cox
2008-05-20 23:01 ` Mike Frysinger
2008-05-20 23:25 ` Jonathan Corbet
2008-05-21 16:22 ` Mike Frysinger
2008-05-19 23:34 ` [PATCH 3/3, RFC] remove BKL from misc_open() Arnd Bergmann
2008-05-20 15:13 ` [PATCH, RFC] char dev BKL pushdown Jonathan Corbet
2008-05-20 17:21 ` Arnd Bergmann
2008-05-20 18:51 ` Alan Cox
2008-05-17 21:58 ` Linus Torvalds
2008-05-18 20:07 ` Jonathan Corbet
2008-05-14 22:11 ` [announce] "kill the Big Kernel Lock (BKL)" tree Andi Kleen
2008-05-14 22:16 ` Linus Torvalds
2008-05-14 22:21 ` Andi Kleen
2008-05-15 13:30 ` Alan Cox
2008-05-15 15:05 ` John Stoffel
2008-05-15 15:10 ` Andi Kleen
2008-05-15 15:18 ` John Stoffel
2008-05-15 15:45 ` Andi Kleen
2008-05-15 8:44 ` Jan Engelhardt
2008-05-15 14:54 ` Diego Calleja
2008-05-14 21:46 ` Alan Cox
2008-05-14 22:11 ` Linus Torvalds
2008-05-14 22:15 ` Andi Kleen
2008-05-15 17:41 ` Linus Torvalds
2008-05-15 20:27 ` Arjan van de Ven
2008-05-15 20:45 ` Peter Zijlstra
2008-05-15 21:22 ` Arjan van de Ven
2008-05-17 0:14 ` Kevin Winchester
2008-05-17 0:37 ` Kevin Winchester
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=20080515080211.GA14821@elte.hu \
--to=mingo@elte.hu \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=andi@firstfloor.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=viro@ftp.linux.org.uk \
/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
all inboxes | Powered by JetHome®