From: Martin Wirth <Martin.Wirth@dlr.de>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: Robert Love <rml@tech9.net>,
linux-kernel@vger.kernel.org, akpm@zip.com.au, mingo@elte.hu,
haveblue@us.ibm.com
Subject: Re: [RFC] New locking primitive for 2.5
Date: Fri, 08 Feb 2002 19:12:33 +0100 [thread overview]
Message-ID: <3C641511.9555ED47@dlr.de> (raw)
In-Reply-To: <Pine.LNX.4.33.0202081027070.2672-100000@athlon.transmeta.com>
Linus Torvalds wrote:
>
> Now, before we go further, can people explain _why_ we want this?
>
> If something is getting a lot of short contention as a semaphore, maybe
> it's just broken locking. Let's not work around it with a new locking
> primitive just because we can.
>
> What is the _existing_ problem this is trying to solve, and why?
>
> Linus
There are currently several attempts discussed to push out the
BKL and replace it by a semaphore e.g. the next step Robert Love
planned for his ll_seek patch (replace the BKL by inode i_sem).
The naive replacement BKL -> semaphore is surely bad.
Now on the other extreme you may always find a splitting of
the data you want to protected into short locked and long locked
sections like Christoph Hellwig suggested for i_sem:
>
> No. i_sem should be split into a spinlock for short-time accessed
> fields that get written to even if the file content is only read (i.e.
> atime) and a read-write semaphore.
>
But this approach needs a lot a proper documentation and discipline.
So for most BKL removal work I suggested the combi-lock which scales
better than a semaphore but is more manageable than splitted locking.
Martin
P.S.: I posted the combi-lock as a practical RFC to bring the discussion
about lock scalability, latency and possible preemptiblity of the
linux kernel back to a concrete technical level (if you look at the
"[2.4.17/18] VM and swap - it's really unusable" thread some weeks
ago you can surely imagine why). And the simple reason is that for
my real time data acquisition systems I really would like to get rid
of my SunOS 5.8 and W2K machines. But the truth is that the standard
linux kernel is a real (worst case) latency hog even when compared with
these two bloated OS, at least for my applications. Only Andrew
Morton's (full)-ll patch boosts linux to comparable performance
(less than 1-2 ms latency under heavy io-load). (I know that SunOS 5.8
and W2K also can have larger latencies under special circumstances,
but not for a simple streaming data acquisition with some online
visualization).
next prev parent reply other threads:[~2002-02-08 18:13 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-07 15:38 [RFC] New locking primitive for 2.5 Martin Wirth
2002-02-07 18:04 ` Daniel Phillips
2002-02-07 18:06 ` Richard Gooch
2002-02-07 18:22 ` Christoph Hellwig
2002-02-07 19:33 ` Daniel Phillips
2002-02-07 19:55 ` Mark Frazer
2002-02-08 12:24 ` Denis Vlasenko
2002-02-07 18:40 ` Robert Love
2002-02-07 19:25 ` Andrew Morton
2002-02-07 19:51 ` Dave Hansen
2002-02-07 20:06 ` Andrew Morton
2002-02-07 20:11 ` Robert Love
2002-02-07 21:27 ` Ingo Molnar
2002-02-07 19:59 ` Andrew Morton
2002-02-08 8:20 ` Nigel Gamble
2002-02-08 17:06 ` Larry McVoy
2002-02-07 19:58 ` yodaiken
2002-02-07 20:08 ` Robert Love
2002-02-07 20:15 ` yodaiken
2002-02-07 20:20 ` Robert Love
2002-02-07 20:36 ` yodaiken
2002-02-07 20:57 ` Daniel Phillips
2002-02-07 21:00 ` yodaiken
2002-02-07 21:10 ` Daniel Phillips
2002-02-07 20:49 ` Martin Wirth
2002-02-08 8:34 ` Martin Wirth
2002-02-08 18:28 ` Linus Torvalds
2002-02-08 18:12 ` Martin Wirth [this message]
2002-02-08 18:33 ` Alexander Viro
2002-02-08 20:02 ` Linus Torvalds
2002-02-08 18:54 ` Andrew Morton
2002-02-08 19:11 ` Linus Torvalds
2002-02-08 19:21 ` Alexander Viro
2002-02-08 19:36 ` Robert Love
2002-02-09 0:18 ` Alexander Viro
2002-02-08 21:23 ` Ingo Molnar
2002-02-08 21:36 ` Linus Torvalds
2002-02-08 20:04 ` Jeff Garzik
2002-02-08 21:16 ` Mike Fedyk
2002-02-09 0:09 ` Alan Cox
2002-02-09 0:05 ` Mike Fedyk
2002-02-08 21:40 ` Benjamin Herrenschmidt
2002-02-09 19:32 ` Linus Torvalds
2002-02-07 19:56 ` yodaiken
2002-02-07 22:09 ` Ingo Molnar
2002-02-07 20:31 ` yodaiken
2002-02-07 20:57 ` Andrew Morton
2002-02-07 21:02 ` yodaiken
2002-02-08 12:31 ` Christoph Hellwig
2002-02-08 16:51 ` Nigel Gamble
2002-02-08 18:41 ` Andrew Morton
2002-02-08 20:47 ` Ingo Molnar
2002-02-08 18:56 ` Alexander Viro
2002-02-08 20:59 ` Ingo Molnar
2002-02-08 19:10 ` Alexander Viro
2002-02-08 20:14 ` Anton Altaparmakov
2002-02-08 20:38 ` yodaiken
2002-02-08 21:55 ` Anton Altaparmakov
2002-02-08 12:47 ` Denis Vlasenko
2002-02-08 15:13 ` yodaiken
2002-02-08 19:22 ` Horst von Brand
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=3C641511.9555ED47@dlr.de \
--to=martin.wirth@dlr.de \
--cc=akpm@zip.com.au \
--cc=haveblue@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rml@tech9.net \
--cc=torvalds@transmeta.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