Re: Can we break RDPID/RDTSCP ABI ASAP and see if it's okay?
From: Linus Torvalds
Date: Sat Oct 28 2017 - 19:24:04 EST
On Sat, Oct 28, 2017 at 12:38 PM, Andy Lutomirski <luto@xxxxxxxxxx> wrote:
>
> This won't break any existing RDPID users if we do it quickly because
> there aren't any (the CPUs aren't available). I would be a bit
> surprised if anyone uses RDTSCP for this because it's absurdly slow.
Why do you think that?
Lots of people use rdtscp, I bet. They use it mainly for the TSC,
admittedly, and the example code I looked at all just ignored %rcx,
but maybe they *do* care.
And in particular, with rdtscp, the high 32 bits get lost, so your
suggestion will mean that the thing doesn't contain the node number at
all.
People may in fact use the node number for things like a fast
gettimeofday() - knowing that the TSC is synchronized within a node,
and doing per-node correction..
And maybe not. But it's by no means obvious that just because there
aren't any released processors that support RDPID that this value
isn't used at all.
So I'd be nervous. We could try it, perhaps, but there could be some
_very_ subtle breakage..
Linus