From: Kyle Moffett <mrmacman_g4@mac.com>
To: linux@horizon.com
Cc: cfriesen@nortel.com, dev@sw.ru, linux-kernel@vger.kernel.org
Subject: Re: SMP syncronization on AMD processors (broken?)
Date: Tue, 11 Oct 2005 23:27:33 -0400 [thread overview]
Message-ID: <678DF2CB-3842-4801-9A86-787957CB3DDF@mac.com> (raw)
In-Reply-To: <20051012023950.5261.qmail@science.horizon.com>
On Oct 11, 2005, at 22:39:50, linux@horizon.com wrote:
>> This may work on some processors, but on others the read of
>> "progress" in XXX, or the write in YYY may require arch-specific
>> code to force the update out to other cpus.
>>
>> Alternately, explicitly atomic operations should suffice, but a
>> simple increment is probably not enough for portable code.
>
> Er.. you mean, the pre-incremented value could be cached
> *indefinitely* by XXX? That seems odd...
>
> I can see an arch hook (memory barrier sort of thuing) to push it
> out a bit faster, but are there architecures on which noticing the
> increment could be delayed indefinitely?
>
> In particular, that same hook would already be used by the spin
> lock release sequence (to ensure that someone else notices the lock
> is now available), and unless it's address-specific, it would do
> for the "progress" counter as well.
Umm, IIRC, some architectures (don't remember which ones, but I'd
guess it's the big 512-way boxen) have cache-line-and-memory models
such that a cacheline may remain out-of-date indefinitely unless the
CPU with the update runs a "cache-line flush" instruction or the CPU
who wants an update requests one with an exclusive cacheline lock or
similar. On such a system, the only way to ensure safe distribution
of data between CPUs is to make sure it's in the same cacheline as
the spinlock (and document that fact) or use special instructions to
verify coherency.
Cheers,
Kyle Moffett
--
Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are, by
definition, not smart enough to debug it.
-- Brian Kernighan
next prev parent reply other threads:[~2005-10-12 3:28 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-11 23:50 linux
2005-10-12 2:12 ` Christopher Friesen
2005-10-12 2:39 ` linux
2005-10-12 3:27 ` Kyle Moffett [this message]
2005-10-13 12:25 ` Kirill Korotaev
-- strict thread matches above, loose matches on Subject: below --
2005-10-08 9:31 Chuck Ebbert
2005-10-06 13:05 Kirill Korotaev
2005-10-06 13:14 ` linux-os (Dick Johnson)
2005-10-06 13:19 ` Arjan van de Ven
2005-10-06 13:32 ` Andrey Savochkin
2005-10-06 14:22 ` Arjan van de Ven
2005-10-06 13:32 ` Andi Kleen
2005-10-06 13:46 ` Andrey Savochkin
2005-10-06 14:52 ` Linus Torvalds
2005-10-06 15:21 ` Andrey Savochkin
2005-10-06 15:46 ` Linus Torvalds
2005-10-11 0:59 ` Andrew Morton
2005-10-11 1:20 ` Andi Kleen
2005-10-11 3:20 ` Joe Seigh
2005-10-06 13:50 ` Eric Dumazet
2005-10-06 14:45 ` Linus Torvalds
2005-10-06 15:34 ` Hugh Dickins
2005-10-06 15:53 ` Eric Dumazet
2005-10-06 16:01 ` Linus Torvalds
2005-10-07 20:38 ` Joe Seigh
2005-10-07 20:57 ` Stephen Hemminger
2005-10-13 18:24 ` Joe Seigh
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=678DF2CB-3842-4801-9A86-787957CB3DDF@mac.com \
--to=mrmacman_g4@mac.com \
--cc=cfriesen@nortel.com \
--cc=dev@sw.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@horizon.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®