From: Christoph Lameter <clameter@sgi.com>
To: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Zoltan Menyhart <Zoltan.Menyhart@bull.net>,
"Boehm, Hans" <hans.boehm@hp.com>,
"Grundler, Grant G" <grant.grundler@hp.com>,
"Chen, Kenneth W" <kenneth.w.chen@intel.com>,
akpm@osdl.org, linux-kernel@vger.kernel.org,
linux-ia64@vger.kernel.org
Subject: Re: Fix unlock_buffer() to work the same way as bit_unlock()
Date: Thu, 30 Mar 2006 11:11:15 -0800 (PST) [thread overview]
Message-ID: <Pine.LNX.4.64.0603301107480.370@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <442B9D18.4050903@yahoo.com.au>
On Thu, 30 Mar 2006, Nick Piggin wrote:
> Zoltan Menyhart wrote:
>
> > However, I do not think your implementation would be efficient due to
> > selecting the ordering mode at run time:
> >
> > > + switch (mode) {
> > > + case MODE_NONE :
> > > + case MODE_ACQUIRE :
> > > + return cmpxchg_acq(m, old, new);
> > > + case MODE_FENCE :
> > > + smp_mb();
> > > + /* Fall through */
> > > + case MODE_RELEASE :
> > > + return cmpxchg_rel(m, old, new);
> >
>
> BTW. Isn't MODE_FENCE wrong? Seems like a read or write could be moved
> above cmpxchg_rel?
Hmmm.... We should call this MODE_BARRIER I guess...
> I think you need rel+acq rather than acq+rel (if I'm right, then the
> same goes for your earlier bitops patches, btw).
The question is what does fence imply for the order of the atomic
operation. Will the operation be performed before or after the barrier?
Or do we need barriers on both sides?
If so then we may simulate that with a release and then do a acquire load
afterwards
cmpxchg_rel(m, old, new);
return *m; /* m volatile so it has acquire semantics */
next prev parent reply other threads:[~2006-03-30 19:11 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-29 22:56 Boehm, Hans
2006-03-29 23:33 ` Christoph Lameter
2006-03-29 23:49 ` Chen, Kenneth W
2006-03-29 23:50 ` Christoph Lameter
2006-03-29 23:50 ` Grant Grundler
2006-03-30 8:43 ` Zoltan Menyhart
2006-03-30 8:55 ` Nick Piggin
2006-03-30 19:11 ` Christoph Lameter [this message]
2006-03-30 17:17 ` Christoph Lameter
-- strict thread matches above, loose matches on Subject: below --
2006-03-30 22:26 Boehm, Hans
2006-03-30 17:57 Boehm, Hans
2006-03-30 18:17 ` Christoph Lameter
2006-03-29 19:31 Boehm, Hans
2006-03-29 22:17 ` Christoph Lameter
2006-03-29 18:33 Boehm, Hans
2006-03-29 19:11 ` Grant Grundler
2006-03-28 3:59 Christoph Lameter
2006-03-28 8:10 ` Nick Piggin
2006-03-28 18:53 ` Chen, Kenneth W
2006-03-28 21:42 ` Zoltan Menyhart
2006-03-28 23:48 ` Christoph Lameter
2006-03-29 0:07 ` Nick Piggin
2006-03-29 2:23 ` Christoph Lameter
2006-03-29 2:35 ` Nick Piggin
2006-03-29 6:46 ` Chen, Kenneth W
2006-03-29 7:11 ` Christoph Lameter
2006-03-30 1:34 ` Nick Piggin
2006-03-29 0:12 ` Chen, Kenneth W
2006-03-29 0:27 ` Chen, Kenneth W
2006-03-29 0:47 ` Christoph Lameter
2006-03-29 1:39 ` Chen, Kenneth W
2006-03-29 12:16 ` Zoltan Menyhart
2006-03-30 1:56 ` Nick Piggin
2006-03-29 10:57 ` Zoltan Menyhart
2006-03-29 6:50 ` Chen, Kenneth W
2006-03-30 1:36 ` Nick Piggin
[not found] ` <442AA13B.3050104@bull.net>
2006-03-30 1:57 ` Nick Piggin
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=Pine.LNX.4.64.0603301107480.370@schroedinger.engr.sgi.com \
--to=clameter@sgi.com \
--cc=Zoltan.Menyhart@bull.net \
--cc=akpm@osdl.org \
--cc=grant.grundler@hp.com \
--cc=hans.boehm@hp.com \
--cc=kenneth.w.chen@intel.com \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nickpiggin@yahoo.com.au \
/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®