linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Why is wmb() a no-op on x86_64?
@ 2006-01-18 16:23 Bryan O'Sullivan
  2006-01-18 16:29 ` Andi Kleen
  0 siblings, 1 reply; 8+ messages in thread
From: Bryan O'Sullivan @ 2006-01-18 16:23 UTC (permalink / raw)
  To: linux-kernel, discuss, Andi Kleen

Hi, Andi -

I notice that wmb() is a no-op on x86_64 kernels unless
CONFIG_UNORDERED_IO is set.  Is there any particular reason for this?
It's not similarly conditional on other platforms, and as a consequence,
in our driver (which requires a write barrier in some situations for
correctness), I have to add the following piece of ugliness:

#if defined(CONFIG_X86_64) && !defined(CONFIG_UNORDERED_IO)
#define ipath_wmb() asm volatile("sfence" ::: "memory")
#else
#define ipath_wmb() wmb()
#endif

	<b


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-01-19 10:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-18 16:23 Why is wmb() a no-op on x86_64? Bryan O'Sullivan
2006-01-18 16:29 ` Andi Kleen
2006-01-18 16:52   ` Bryan O'Sullivan
2006-01-18 17:06     ` Jes Sorensen
2006-01-18 17:23       ` Bryan O'Sullivan
2006-01-18 17:31       ` [discuss] " Andi Kleen
2006-01-19 10:03         ` Jes Sorensen
2006-01-18 20:07       ` Roland Dreier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).