Re: [PATCH] Define wc_wmb, a write barrier for PCI write combining

From: Andi Kleen
Date: Wed Mar 01 2006 - 14:47:21 EST


On Wednesday 01 March 2006 20:43, Bryan O'Sullivan wrote:

> > Implementing the fences in the way your're suggesting would be very costly
> > because it could make them potentially stall for thousands of cycles.
>
> But it *doesn't*. On existing CPUs and systems, today, the phantom
> worse-case semantics you are conjuring up simply do not exist. If
> someone builds such an asinine system, the right approach is to handle
> it once it exists.

Normally we write code to the defined architecture.

Relying on undocumented side effects of instructions as you're trying
to do here is not very reliable and would likely cause breakage later.

Especially not for encoding it in the general Linux interface.

-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/