From: Petr Vandrovec <vandrove@vc.cvut.cz>
To: dean gaudet <dean@arctic.org>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>,
Linus Torvalds <torvalds@linux-foundation.org>,
ak@suse.de, Jesse Barnes <jesse.barnes@intel.com>,
linux-kernel@vger.kernel.org
Subject: Re: Intel Memory Ordering White Paper
Date: Sat, 08 Sep 2007 05:08:51 -0700 [thread overview]
Message-ID: <46E290D3.10304@vc.cvut.cz> (raw)
In-Reply-To: <Pine.LNX.4.64.0709080429420.27088@twinlark.arctic.org>
dean gaudet wrote:
> On Sun, 9 Sep 2007, Nick Piggin wrote:
>
>> I've also heard that string operations do not follow the normal ordering, but
>> that's just with respect to individual loads/stores in the one operation, I
>> hope? And they will still follow ordering rules WRT surrounding loads and
>> stores?
>
> see section 7.2.3 of intel volume 3A...
>
> "Code dependent upon sequential store ordering should not use the string
> operations for the entire data structure to be stored. Data and semaphores
> should be separated. Order dependent code should use a discrete semaphore
> uniquely stored to after any string operations to allow correctly ordered
> data to be seen by all processors."
>
> i think we need sfence after things like copy_page, clear_page, and
> possibly copy_user... at least on intel processors with fast strings
> option enabled.
I do not think. I believe that authors are trying to say that
struct { uint8 lock; uint8 data; } x;
lea (x.data),%edi
mov $2,%ecx
std
rep movsb
to set both data and lock does not guarantee that x.lock will be set
after x.data and that you should do
lea (x.data),%edi
std
movsb
movsb # or mov (%esi),%al; mov %al,(%edi), but movsb looks discrete
enough to me
instead (and yes, I know that my example is silly).
Petr
next prev parent reply other threads:[~2007-09-08 12:08 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-07 22:26 Intel Memory Ordering White Paper Jesse Barnes
2007-09-08 8:54 ` Nick Piggin
2007-09-07 23:20 ` Linus Torvalds
2007-09-08 17:34 ` Nick Piggin
2007-09-08 17:48 ` Nick Piggin
2007-09-07 18:13 ` Nick Piggin
2007-09-08 8:53 ` Andi Kleen
2007-09-07 19:57 ` Nick Piggin
2007-09-08 10:19 ` Andi Kleen
2007-09-07 20:32 ` Nick Piggin
2007-09-08 20:37 ` H. Peter Anvin
2007-09-08 11:34 ` dean gaudet
2007-09-08 12:08 ` Petr Vandrovec [this message]
2007-09-08 12:27 ` dean gaudet
2007-09-08 10:30 ` Alan Cox
2007-09-07 20:46 ` Nick Piggin
2007-09-08 10:29 ` Alan Cox
2007-09-07 20:49 ` Nick Piggin
2007-09-08 14:11 ` Alan Cox
2007-09-12 18:26 ` Dr. David Alan Gilbert
2007-09-19 16:26 ` Jesse Barnes
2007-09-19 17:29 ` Andi Kleen
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=46E290D3.10304@vc.cvut.cz \
--to=vandrove@vc.cvut.cz \
--cc=ak@suse.de \
--cc=dean@arctic.org \
--cc=jesse.barnes@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nickpiggin@yahoo.com.au \
--cc=torvalds@linux-foundation.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.