[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFwYKaz+QxeO8wfhfc_amq=CFvuwnurAbONon1_KD_U-PQ@mail.gmail.com>
Date: Sat, 28 Oct 2017 16:23:57 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Andy Lutomirski <luto@...nel.org>
Cc: Peter Zijlstra <peterz@...radead.org>, X86 ML <x86@...nel.org>,
Borislav Petkov <bp@...en8.de>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
linux-abi@...r.kernel.org
Subject: Re: Can we break RDPID/RDTSCP ABI ASAP and see if it's okay?
On Sat, Oct 28, 2017 at 12:38 PM, Andy Lutomirski <luto@...nel.org> 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
Powered by blists - more mailing lists