From: Jeff Garzik <jgarzik@mandrakesoft.com>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: Ingo Molnar <mingo@elte.hu>, Alexander Viro <viro@math.psu.edu>,
Andrew Morton <akpm@zip.com.au>,
Martin Wirth <Martin.Wirth@dlr.de>, Robert Love <rml@tech9.net>,
linux-kernel <linux-kernel@vger.kernel.org>,
haveblue <haveblue@us.ibm.com>
Subject: Re: [RFC] New locking primitive for 2.5
Date: Fri, 08 Feb 2002 15:04:34 -0500 [thread overview]
Message-ID: <3C642F52.ABD14619@mandrakesoft.com> (raw)
In-Reply-To: <Pine.LNX.4.33.0202081328060.1095-100000@home.transmeta.com>
Linus Torvalds wrote:
>
> On Fri, 8 Feb 2002, Ingo Molnar wrote:
> >
> > and regarding the reintroduction of BKL, *please* do not just use a global
> > locks around such pieces of code, lock bouncing sucks on SMP, even if
> > there is no overhead.
>
> I'd suggest not having a lock at all, but instead add two functions: one
> to read a 64-bit value atomically, the other to write it atomically (and
> they'd be atomic only wrt each other, no memory barriers etc implied).
>
> On 64-bit architectures that's just a direct dereference, and even on x86
> it's just a "cmpxchg8b".
Are there architectures out there that absolutely must implement this
with a spinlock? Your suggested API of functions to read/write 64-bit
values atomically would work for such a case, but still I am just
curious.
Jeff
--
Jeff Garzik | "I went through my candy like hot oatmeal
Building 1024 | through an internally-buttered weasel."
MandrakeSoft | - goats.com
next prev parent reply other threads:[~2002-02-08 20:04 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
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 [this message]
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=3C642F52.ABD14619@mandrakesoft.com \
--to=jgarzik@mandrakesoft.com \
--cc=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 \
--cc=viro@math.psu.edu \
/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