Thread (1 message) 1 message, 1 author, 2018-10-04

Re: [patch 00/11] x86/vdso: Cleanups, simmplifications and CLOCK_TAI support

From: Andy Lutomirski <luto@kernel.org>
Date: 2018-10-04 20:33:07
Also in: lkml

On Fri, Sep 14, 2018 at 5:52 AM Thomas Gleixner [off-list ref] wrote:
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.
tglx, please consider this whole series Acked-by: Andy Lutomirski
[off-list ref]

Please feel free to push it top tip:x86/vdso, as long as you pull in
tip/x86/urgent first.  Once it lands, I'll email out a couple of
follow-up patches.

--Andy
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help