From: Dave Hansen <haveblue@us.ibm.com>
To: Greg KH <greg@kroah.com>,
kernel-janitor-discuss
<kernel-janitor-discuss@lists.sourceforge.net>,
linux-kernel@vger.kernel.org
Subject: Re: BKL removal
Date: Sun, 07 Jul 2002 14:35:31 -0700 [thread overview]
Message-ID: <3D28B423.9060903@us.ibm.com> (raw)
In-Reply-To: 20020707205543.GA18298@kroah.com
Greg KH wrote:
>>It is not just a matter of scalability, but maintainability. I find
>>it hard to read and understand code which uses the BKL. As Greg said
>>in his OLS coding style talk, I want you to be able to read my code to
>>find _my_ mistakes. Your ability to do that will be impaired by every
>>bad indentation, typedef, and BKL use.
>
> Excuse me, but please do NOT compare coding style with using the BKL! I
> can use the BKL in my code just fine, and it does not impare your
> ability to use, modify, or understand my code. As long as I comment why
> I am using the BKL.
If it was easy to modify, I wouldn't be making such a mess of things,
right? (this assumes I'm _not_ a blundering idiot, which hasn't been
proven)
"As long as I comment [and understand] why I am using the BKL."
would be a bit more accurate. How many places in the kernel have you
seen comments about what the BKL is actually doing? Could you point
me to some of your comments where _you_ are using the BKL? Once you
fully understand why it is there, the extra step of removal is usually
very small.
>>A lock with a single purpose, guarding relatively small amounts of
>>data is much easier to understand than one such as the BKL. Would you
>>want a simple VM operation to take 1 second as the TTY layer and ext3
>>take their sweet time with the BKL?
>
> If ext3 is spinning on the BKL, then try to fix that, as it seems like a
> worthwhile task (like the ext2 changes proved.) If you want to remove
> the BKL from the tty layer, be my guest, that will involve rewriting
> that whole subsystem :)
All that I'm saying is that there can be unintended consequences. By
having it in your code, you open the possibility of these strange
interactions and a drop in _your_ code's reliability.
I'm staying well away from the TTY layer, it is just a well known
example.
>>I would mind the BKL a lot less if it was as well understood
>>everywhere as it is in VFS. The funny part is that a lock like the
>>BKL would not last very long if it were well understood or documented
>>everywhere it was used.
>
> I would mind it a whole lot less if when you try to remove the BKL, you
> do it correctly. So far it seems like you enjoy doing "hit and run"
> patches, without even fully understanding or testing your patches out
> (the driverfs and input layer patches are proof of that.) This does
> nothing but aggravate the developers who have to go clean up after you.
Like it or not, the only way to get maintainers to pay any attention
at all is to give them code. Is there more likely to be progress if I
just say, "Hey Greg, why don't you take the BKL out of USB", or if I
send you a crappy patch which has the beginning of a valid approach?
Code gets people thinking.
> Also, stay away from instances of it's use WHERE IT DOES NOT MATTER for
> performance. If I grab the BKL on insertion or removal of a USB device,
> who cares? I know you are trying to remove it entirely out of the
> kernel, but please focus on places where it actually helps, and leave
> the other instances alone.
You're sorely mistaken because I'm not trying to remove it entirely
from the kernel. I wouldn't cry if that happened tomorrow, but I
don't have any delusions about it happening any time soon.
Call me "Ike", but I'm a domino theorist. One instance of the BKL
spawns many more over time, because they tend to proliferate for no
other reason than "just to be safe". The hardest ones to remove are
those that shouldn't have been there in the first place.
--
Dave Hansen
haveblue@us.ibm.com
next prev parent reply other threads:[~2002-07-07 21:38 UTC|newest]
Thread overview: 95+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.LNX.4.44L.0207061306440.8346-100000@imladris.surriel.com>
[not found] ` <3D27390E.5060208@us.ibm.com>
2002-07-07 20:55 ` BKL removal Greg KH
2002-07-07 21:28 ` Oliver Neukum
2002-07-07 21:58 ` Dave Hansen
2002-07-07 22:38 ` Oliver Neukum
2002-07-07 21:35 ` Dave Hansen [this message]
2002-07-07 21:55 ` Thunder from the hill
2002-07-07 22:42 ` Dave Hansen
2002-07-07 23:07 ` Thunder from the hill
2002-07-07 23:23 ` Dave Hansen
2002-07-07 23:34 ` Thunder from the hill
2002-07-07 23:42 ` Sean Neakums
2002-07-07 23:31 ` Oliver Neukum
2002-07-07 23:45 ` Dave Hansen
2002-07-08 2:34 ` Matthew Wilcox
2002-07-08 2:52 ` Dave Hansen
2002-07-08 3:06 ` Alexander Viro
2002-07-08 12:33 ` Matthew Wilcox
2002-07-08 14:53 ` Dave Hansen
2002-07-08 12:29 ` Matthew Wilcox
2002-07-08 2:58 ` Alexander Viro
2002-07-08 3:06 ` Dave Hansen
2002-07-08 12:15 ` Matthew Wilcox
2002-07-08 6:34 ` Oliver Neukum
2002-07-07 23:23 ` Oliver Neukum
2002-07-07 23:31 ` Dave Hansen
2002-07-07 23:51 ` Greg KH
2002-07-08 0:07 ` Dave Hansen
2002-07-08 2:12 ` Greg KH
2002-07-09 1:46 ` Rick Lindsley
2002-07-09 4:38 ` Greg KH
2002-07-09 19:31 ` Rick Lindsley
2002-07-09 20:17 ` Greg KH
2002-07-09 20:55 ` Rick Lindsley
2002-07-09 21:00 ` William Lee Irwin III
2002-07-09 21:12 ` Robert Love
2002-07-09 14:19 ` Dave Hansen
2002-07-09 21:29 ` Robert Love
2002-07-09 14:44 ` Dave Hansen
2002-07-09 21:47 ` Robert Love
2002-07-10 1:15 ` Arnaldo Carvalho de Melo
2002-07-10 3:27 ` Alexander Viro
2002-07-09 20:49 ` Dave Hansen
2002-07-10 5:30 ` Alexander Viro
2002-07-10 10:28 ` Sandy Harris
2002-07-18 0:30 ` David Wagner
2002-07-18 1:03 ` Daniel Phillips
2002-07-09 21:59 ` William Lee Irwin III
2002-07-09 22:21 ` Alan Cox
2002-07-10 13:31 ` jlnance
2002-07-10 14:17 ` Alan Cox
2002-07-15 20:53 ` Alexander Hoogerhuis
2002-07-15 22:07 ` Rik van Riel
2002-07-15 22:25 ` Thunder from the hill
2002-07-09 19:33 ` Rick Lindsley
2002-07-09 20:12 ` Greg KH
2002-07-09 4:49 ` Drew P. Vogel
2002-07-09 5:25 ` Dave Hansen
2002-07-09 5:21 ` Larry McVoy
2002-07-09 7:59 ` Roman Zippel
2002-07-10 10:03 ` Marco Colombo
2002-07-10 14:40 ` Matthew Wilcox
2002-07-10 16:46 ` William Lee Irwin III
2002-07-11 9:57 ` Marco Colombo
2002-07-10 21:28 ` Rick Lindsley
2002-07-10 22:24 ` Daniel Phillips
2002-07-10 23:36 ` spinlock assertion macros Jesse Barnes
2002-07-11 0:54 ` Andreas Dilger
2002-07-11 1:10 ` Jesse Barnes
2002-07-11 5:31 ` Daniel Phillips
2002-07-11 7:19 ` george anzinger
2002-07-11 16:35 ` Oliver Xymoron
2002-07-11 23:52 ` Sandy Harris
2002-07-12 0:56 ` Daniel Phillips
2002-07-12 3:22 ` Oliver Xymoron
2002-07-11 18:03 ` Jesse Barnes
2002-07-11 19:17 ` Daniel Phillips
2002-07-12 12:07 ` Dave Jones
2002-07-12 12:55 ` Daniel Phillips
2002-07-12 19:24 ` Arnd Bergmann
2002-07-12 17:42 ` Daniel Phillips
2002-07-17 2:22 ` Jesse Barnes
2002-07-17 6:34 ` Daniel Phillips
2002-07-18 23:36 ` [PATCH] spinlock assertion macros for 2.5.26 Jesse Barnes
2002-07-17 11:09 ` spinlock assertion macros Arnd Bergmann
2002-07-12 20:41 ` Oliver Xymoron
2002-07-13 3:21 ` Daniel Phillips
2002-07-12 17:49 ` Robert Love
2002-07-12 17:58 ` Dave Jones
2002-07-11 10:51 ` Arnd Bergmann
2002-07-07 22:24 ` BKL removal Greg KH
2002-07-08 0:56 ` Bernd Eckenfels
2002-07-10 0:30 ` Pavel Machek
[not found] <0C01A29FBAE24448A792F5C68F5EA47D2B0C8A@nasdaq.ms.ensim.com>
2002-07-08 19:00 ` pmenage
2002-07-08 21:45 ` Oliver Neukum
2002-07-10 7:32 dan carpenter
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=3D28B423.9060903@us.ibm.com \
--to=haveblue@us.ibm.com \
--cc=greg@kroah.com \
--cc=kernel-janitor-discuss@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
/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