Re: [RFT/PATCH v2 2/6] x86-64: Optimize vread_tsc's barriers

From: Andi Kleen
Date: Thu Apr 07 2011 - 18:52:17 EST


> If only one lfence or serializing instruction is to be used, can't we
> just use RDTSCP instruction (X86_FEATURE_RDTSCP,available only in >=
> i7's and AMD) which both provides TSC as well as an upward serializing

RDTSCP is a full synchronization, much heavier and slower than LFENCE
(or even two of them) Besides it doesn't exist on older CPUs.

-Andi
--
ak@xxxxxxxxxxxxxxx -- Speaking for myself only.
--
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/