Re: [patch 134/149] x86, paravirt: Add a global synchronization point for pvclock

From: Linus Torvalds
Date: Wed Jul 14 2010 - 14:30:10 EST


On Wed, Jul 14, 2010 at 11:15 AM, Jeremy Fitzhardinge <jeremy@xxxxxxxx> wrote:
>
> I think we should consider that deprecated and rely on dependencies and
> clobbers.

That makes no sense. According to that logic, "asm volatile" has no
semantic meaning at ALL. That's just crazy talk.

The sane compiler semantics for "asm volatile" is that it acts as a
volatile memory access. That's what the naming implies, and it has
valid semantics that also happen to match the historical semantics. It
means that it cannot be removed or duplicated, and it cannot be
re-ordered wrt other volatile accesses (whether "asm volatile" or a
traditional C volatile memory access).

I agree that we could just add memory clobbers to them all, but my
objection to that is that it just makes the whole keyword totally
pointless.

Linus
--
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/