x86/vdso: Cleanups, simmplifications and CLOCK_TAI support
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest posting 2/211 patches 2 repliesIn review
- v2 posting 1/20 of 11 patches 0 repliesSuperseded
- v111 patches 119 repliesSuperseded
Changes in v2 from the cover letter
- Fix the VCLOCK_MAX sanity check
- Remove the magic clock masking and extend the storage array
Patches in v2 posting 2/2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/11 | clocksource: Provide clocksource_arch_init()include/ kernel/ kernel/ | +11 | 0 replies | |
| 1/11 | clocksource: Provide clocksource_arch_init()include/ kernel/ kernel/ | +11 | 1 reply | |
| 2/11 | x86/time: Implement clocksource_arch_init()arch/ arch/ | +17 | 0 replies | |
| 2/11 | x86/time: Implement clocksource_arch_init()arch/ arch/ | +17 | 0 replies | |
| 3/11 | x86/vdso: Enforce 64bit clocksourcearch/ arch/ | +7 | 0 replies | |
| 3/11 | x86/vdso: Enforce 64bit clocksourcearch/ arch/ | +7 | 0 replies | |
| 4/11 | x86/vdso: Use unsigned int consistently for vsyscall_gtod_data::seqarch/ arch/ | +9 | 0 replies | |
| 4/11 | x86/vdso: Use unsigned int consistently for vsyscall_gtod_data::seqarch/ arch/ | +9 | 0 replies | |
| 5/11 | x86/vdso: Introduce and use vgtod_tsarch/ arch/ arch/ | +61 | 0 replies | |
| 5/11 | x86/vdso: Introduce and use vgtod_tsarch/ arch/ arch/ | +61 | 0 replies | |
| 6/11 | x86/vdso: Collapse high resolution functionsarch/ | +7 | 0 replies | |
| 6/11 | x86/vdso: Collapse high resolution functionsarch/ | +7 | 0 replies | |
| 7/11 | x86/vdso: Collapse coarse functionsarch/ | +4 | 0 replies | |
| 7/11 | x86/vdso: Collapse coarse functionsarch/ | +4 | 0 replies | |
| 8/11 | x86/vdso: Replace the clockid switch casearch/ | +18 | 0 replies | |
| 8/11 | x86/vdso: Replace the clockid switch casearch/ | +18 | 0 replies | |
| 9/11 | x86/vdso: Simplify the invalid vclock casearch/ | +21 | 0 replies | |
| 9/11 | x86/vdso: Simplify the invalid vclock casearch/ | +21 | 0 replies | |
| 10/11 | x86/vdso: Move cycle_last handling into the callerarch/ | +7 | 0 replies | |
| 10/11 | x86/vdso: Move cycle_last handling into the callerarch/ | +7 | 0 replies | |
| 11/11 | x66/vdso: Add CLOCK_TAI supportarch/ arch/ | +6 | 0 replies | |
| 11/11 | x66/vdso: Add CLOCK_TAI supportarch/ arch/ | +6 | 1 reply |
Reviews trailers per patch
2 of 22 patches have a Reviewed-by or Acked-by.
| Patch | John Stultz | Matt Rickard |
|---|---|---|
| 1/11 | A-b | |
| 1/11 | A-b | |
| 2/11 | ||
| 2/11 | ||
| 3/11 | ||
| 3/11 | ||
| 4/11 | ||
| 4/11 | ||
| 5/11 | ||
| 5/11 | ||
| 6/11 | ||
| 6/11 | ||
| 7/11 | ||
| 7/11 | ||
| 8/11 | ||
| 8/11 | ||
| 9/11 | ||
| 9/11 | ||
| 10/11 | ||
| 10/11 | ||
| 11/11 | T-b | |
| 11/11 | T-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [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(-)