Re: [RFC PATCH 4/4] x86/TSC: Use RDTSCP

From: Borislav Petkov
Date: Wed Dec 12 2018 - 15:29:58 EST

On Wed, Dec 12, 2018 at 12:09:00PM -0800, Andy Lutomirski wrote:
> Also that the uarch doesn't turn:
> load some memory
> into a load followed a cycle later by RDTSC. If that happened, then
> some cooperating CPUs could observe time going backwards.

How so? Details?

Because I wouldn't be surprised at all if the logical CPUs on the same
node would see actually the same timestamp counter which is propagated
from the northbridge into the cores instead of maintaining it in each
core and having to synchronize it periodically.

But maybe you mean something completely different...

> But RDTSC has no dependencies, so, barring odd register renaming
> effects or similar, this isn't going to be a problem in practice.

Did you talk to hw guys about it? Because I don't see anything blocking
the CPU from reordering those...


Good mailing practices for 400: avoid top-posting and trim the reply.