From: "Paul McKenney" <Paul.McKenney@us.ibm.com>
To: "Albert D. Cahalan" <acahalan@cs.uml.edu>
Cc: andrea@suse.de (Andrea Arcangeli),
cardoza@zk3.dec.com, frival@zk3.dec.com (Peter Rival),
ink@jurassic.park.msu.ru (Ivan Kokshaysky),
Jay.Estabrook@compaq.com, linux-kernel@vger.kernel.org,
lse-tech@lists.sourceforge.net,
rth@twiddle.net (Richard Henderson),
woodward@zk3.dec.com
Subject: Re: [Lse-tech] Re: RFC: patch to allow lock-free traversal of lists with
Date: Thu, 11 Oct 2001 23:35:38 -0700 [thread overview]
Message-ID: <OFEF9283F3.DB79EDD4-ON88256AE3.0024377A@boulder.ibm.com> (raw)
> > Note that they require a memory barrier (rmb()) between the time the
> > item is removed from the queue and the time that the data in the item
> > is referenced, despite the fact that there is a data dependency between
> > the dequeueing and the dereferencing. So, again, data dependency does
> > -not- substitute for an MB on Alpha.
>
> This looks an awful lot like the PowerPC architecture.
IIRC, the PowerPC architecture requires that data dependencies
imply ordering (as does SPARC). Unfortunately, I am currently >1000 km
from my PPC manual, and my eyes just aren't quite what they used to be.
I will look it up when I get back on Monday, and post my findings.
Sorry for the lack of an immediate answer!
> In an SMP system, one would most likely mark pages as
> requiring coherency. This means that stores to a memory
> location from multiple processors will give sane results.
> Ordering is undefined when multiple memory locations are
> involved.
Yep, the eieio and SYNC instructions are used to force
ordering.
> There is a memory barrier instruction called "eieio".
> This is commonly used for IO, but is also useful for RAM.
> Two separate sets of memory operations are simultaneously
> and independently affected by eieio:
>
> -- set one, generally memory-mapped IO space --
> loads to uncached + guarded memory
> stores to uncached + guarded memory
> stores to write-through-required memory
>
> -- set two, generally RAM on an SMP box --
> stores to cached + write-back + coherent
Set two is all we care about for SMP locking algorithms.
People writing drivers sometimes have to worry about
set one, but they often do so by use of locks, thus
avoiding the set-one issues.
> "The eieio instruction is intended for use in managing shared data
> structures ... the shared data structure and the lock that protects
> it must be altered only by stores that are in the same set"
> -- from the 32-bit ppc arch book
Yep! If you map the same physical memory as coherent on one
CPU and uncached on another, you are certainly taking your
chances. There may be a situation where doing this sort of
thing is useful, but I don't know of one.
Thanx, Paul
next reply other threads:[~2001-10-12 6:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-12 6:35 Paul McKenney [this message]
-- strict thread matches above, loose matches on Subject: below --
2001-10-10 15:24 [Lse-tech] Re: RFC: patch to allow lock-free traversal of lists with insertion Paul McKenney
2001-10-12 5:43 ` [Lse-tech] Re: RFC: patch to allow lock-free traversal of lists with Albert D. Cahalan
2001-10-12 8:28 ` Alex Bligh - linux-kernel
2001-10-12 8:51 ` Jonathan Lundell
2001-10-12 6:26 ` Paul Mackerras
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=OFEF9283F3.DB79EDD4-ON88256AE3.0024377A@boulder.ibm.com \
--to=paul.mckenney@us.ibm.com \
--cc=Jay.Estabrook@compaq.com \
--cc=acahalan@cs.uml.edu \
--cc=andrea@suse.de \
--cc=cardoza@zk3.dec.com \
--cc=frival@zk3.dec.com \
--cc=ink@jurassic.park.msu.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=lse-tech@lists.sourceforge.net \
--cc=rth@twiddle.net \
--cc=woodward@zk3.dec.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
all inboxes | Powered by JetHome®