[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <871rrzf6u0.fsf@nanos.tec.linutronix.de>
Date: Thu, 16 Jan 2020 22:07:51 +0100
From: Thomas Gleixner <tglx@...utronix.de>
To: Andy Lutomirski <luto@...nel.org>
Cc: Christophe Leroy <christophe.leroy@....fr>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
Michael Ellerman <mpe@...erman.id.au>, nathanl@...ux.ibm.com,
Arnd Bergmann <arnd@...db.de>,
Vincenzo Frascino <vincenzo.frascino@....com>,
Andrew Lutomirski <luto@...nel.org>,
LKML <linux-kernel@...r.kernel.org>,
linuxppc-dev <linuxppc-dev@...ts.ozlabs.org>,
linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
"open list\:MIPS" <linux-mips@...r.kernel.org>,
X86 ML <x86@...nel.org>
Subject: Re: [RFC PATCH v4 08/11] lib: vdso: allow fixed clock mode
Andy Lutomirski <luto@...nel.org> writes:
> On Thu, Jan 16, 2020 at 12:14 PM Thomas Gleixner <tglx@...utronix.de> wrote:
>> Some architectures have a fixed clocksource which is known at compile
>> time and cannot be replaced or disabled at runtime, e.g. timebase on
>> PowerPC. For such cases the clock mode check in the VDSO code is
>> pointless.
>>
> I wonder if we should use this on x86 bare-metal if we have
> sufficiently invariant TSC. (Via static_cpu_has(), not compiled in.)
>
> Maybe there is no such x86 machine.
There might be some, but every time I started to trust the TSC a bit
more someone reported the next variant of brokenness.
Admittedly it has become better at least up to two sockets.
For a start we could do that when the TSC is considered reliable, which
is the case when:
- The TSC is the only available clocksource
- tsc=reliable is on the kernel command line
> I really really want Intel or AMD to introduce machines where the TSC
> pinky-swears to count in actual nanoseconds.
and is guaranteed to be synchronized across any number of sockets/cpus
and has an enforcable protection against BIOS writers.
Ideally it'd have a writeable MSR attached which allows us to tweak the
frequency in the PPM range via NTP/PTP.
Guess how long quite some people including Linus and myself are asking
for this?
I know that Linus started bitching about the TSC before me, but it's
already a bit over 20 years on my side when I first talked to Intel and
AMD about the requirements for a reliable clocksource.
Just to set the time lines straight.
Constant frequency TSC surfaced on Intel in 2006 with the Core brand and
on AMD in 2007 with Barcelona (Fam 10h).
In 2008 the first TSC surfaced which was not affected by C-States and 5
years later in 2013 some Atoms came out where TSC even worked accross
S3.
The > 2 socket issue is still not resolved AFAICT, but we got at least
the TSC ADJUST MSR around 2012 which allowed us for the first time to
reliably detect and mitigate BIOS wreckage.
All the years I was envy on architectures which had simple designed and
just reliably working timers forever.
So now you can extrapolate how long it will take until you get your
pinky-swearing pony :)
Thanks,
tglx
Powered by blists - more mailing lists