This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] PPC atomic cleanup
- From: Steve Munroe <sjmunroe at us dot ibm dot com>
- To: Geoff Keating <geoffk at geoffk dot org>
- Cc: libc-alpha at sources dot redhat dot com
- Date: Tue, 13 May 2003 14:45:19 -0500
- Subject: Re: [PATCH] PPC atomic cleanup
Geoffrey Keating <email@example.com> writes:
> Steven Munroe <firstname.lastname@example.org> writes:
> > #define atomic_write_barrier() __asm ("eieio" ::: "memory")
> This wasn't changed by your patch, but it's surely wrong,
> eieio only applies to I/O segments.
eieio applies to both I/O and RAM segments.
"It acts like a barrier that flows through the storage queues and to main
storage, preventing the reordering of storage accesses across the
barrier.", page 334 of "The PowerPC Architecture"
For RAM accesses, eieio does not enforce order between stores only. As
such eieio is "faster" (fewer machine cycles) than sync which will
"synchronize storage with respect to all processors and mechanism".