[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180917124533.329334911@linutronix.de>
Date: Mon, 17 Sep 2018 14:45:33 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: LKML <linux-kernel@...r.kernel.org>
Cc: Andy Lutomirski <luto@...nel.org>, x86@...nel.org,
Peter Zijlstra <peterz@...radead.org>,
Matt Rickard <matt@...trans.com.au>,
Stephen Boyd <sboyd@...nel.org>,
John Stultz <john.stultz@...aro.org>,
Florian Weimer <fweimer@...hat.com>,
"K. Y. Srinivasan" <kys@...rosoft.com>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
devel@...uxdriverproject.org,
virtualization@...ts.linux-foundation.org,
Paolo Bonzini <pbonzini@...hat.com>,
Arnd Bergmann <arnd@...db.de>, Juergen Gross <jgross@...e.com>
Subject: [patch V2 00/11] x86/vdso: Cleanups,
simmplifications and CLOCK_TAI support
Matt attempted to add CLOCK_TAI support to the VDSO clock_gettime()
implementation, which extended the clockid switch case and added yet
another slightly different copy of the same code.
Especially the extended switch case is problematic as the compiler tends to
generate a jump table which then requires to use retpolines. If jump tables
are disabled it adds yet another conditional to the existing maze.
This series takes a different approach by consolidating the almost
identical functions into one implementation for high resolution clocks and
one for the coarse grained clock ids by storing the base data for each
clock id in an array which is indexed by the clock id.
This completely eliminates the switch case and allows further
simplifications of the code base, which at the end all together gain a few
cycles performance or at least stay on par with todays code. The resulting
performance depends heavily on the micro architecture and the compiler.
Changes vs. V1:
- Fix the VCLOCK_MAX sanity check
- Remove the magic clock masking and extend the storage array
Thanks,
tglx
8<-------------------
arch/x86/Kconfig | 1
arch/x86/entry/vdso/vclock_gettime.c | 199 ++++++++------------------------
arch/x86/entry/vsyscall/vsyscall_gtod.c | 55 ++++----
arch/x86/include/asm/vgtod.h | 42 +++---
arch/x86/kernel/time.c | 22 +++
include/linux/clocksource.h | 5
kernel/time/Kconfig | 4
kernel/time/clocksource.c | 2
8 files changed, 140 insertions(+), 190 deletions(-)
Powered by blists - more mailing lists