From: Andi Kleen <andi@firstfloor.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org,
Linus Torvalds <torvalds@linux-foundation.org>,
Andrew Morton <akpm@linux-foundation.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Thomas Gleixner <tglx@linutronix.de>,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
Alexander Viro <viro@ftp.linux.org.uk>
Subject: Re: [announce] "kill the Big Kernel Lock (BKL)" tree
Date: Wed, 14 May 2008 20:30:29 +0200 [thread overview]
Message-ID: <87fxsk7n7e.fsf@basil.nowhere.org> (raw)
In-Reply-To: <20080514174955.GA515@elte.hu> (Ingo Molnar's message of "Wed, 14 May 2008 19:49:55 +0200")
Ingo Molnar <mingo@elte.hu> writes:
> As some of the latency junkies on lkml already know it, commit 8e3e076
> ("BKL: revert back to the old spinlock implementation") in v2.6.26-rc2
> removed the preemptible BKL feature and made the Big Kernel Lock a
> spinlock and thus turned it into non-preemptible code again. This commit
> returned the BKL code to the 2.6.7 state of affairs in essence.
It's a reasonable start, but have you considered doing this work
in tree instead? As in just add all the warnings, but don't actually
change the semantics yet. I suspect you would get far more users
this way and the work would go faster.
It would be reasonable to enable this in -mm if it the warnings are
not too intrusive (self disable itself etc.)
Also for fixing the ioctls I'm not sure that dynamic instrumentation
will really work because it would be tough to execute them all.
I suspect some variant of static code analysis would make sense
for the ioctls.
I used to do some auditing with cflow. That won't
catch indirect function calls unfortunately, but if there's
some way to find those and bail out one could do an automated
tool that flags all the ioctls that don't sleep for example
(don't have any sleeping functions in the call chain -- this
might need some manual annotation, but hopefully not much)
Then it would be possible to safely switch those over to a blocking
mutex variant of BKL.
Now there could be some more automated analysis here: for example the
main other user of BKL is character open. I suspect to really
make progress here you would also need a open_unlocked() and
do the same for all the open functions etc.
> According to my quick & dirty git-log analysis, at the current pace of
> BKL removal we'd have to wait more than 10 years to remove most BKL
> critical sections from the kernel and to get acceptable latencies again.
Hmm, is BKL really that common still that it's a latency problem?
The few VFS cases like locks can be fixed without extreme measures.
Most of the legacy users are unlikely to be latency problems,
simply because only very few people (or nobody) still has that hardware
and the code will never run.
Also I wouldn't lose sleep over e.g. let ISDN continue using BKL forever.
-Andi
next prev parent reply other threads:[~2008-05-14 18:32 UTC|newest]
Thread overview: 78+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-14 17:49 [announce] "kill the Big Kernel Lock (BKL)" tree Ingo Molnar
2008-05-14 18:30 ` Andi Kleen [this message]
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
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=87fxsk7n7e.fsf@basil.nowhere.org \
--to=andi@firstfloor.org \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--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