timekeeping: 2038, optimizations, NMI safe accessors
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest64 patches 11 repliesIn review
- v155 patches 35 repliesSuperseded
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/64 | tile: Convert VDSO timekeeping to the precise mechanismarch/ arch/ | +8 | 0 replies | |
| 2/64 | timekeeping: Simplify arch_gettimeoffset()kernel/ | +6 | 0 replies | |
| 3/64 | hrtimer: Cleanup hrtimer accessors to the timekepeing stateinclude/ include/ kernel/ +1 more | +39 | 0 replies | |
| 4/64 | ktime: Kill non-scalar ktime_t implementation for 2038arch/ arch/ arch/ +6 more | +7 | 0 replies | |
| 5/64 | ktime: Sanitize ktime_to_us/ms conversioninclude/ include/ kernel/ | +9 | 0 replies | |
| 6/64 | ktime: Change ktime_set() to take 64bit seconds valueinclude/ | +3 | 0 replies | |
| 7/64 | time64: Add time64.h header and define struct timespec64include/ include/ | +164 | 0 replies | |
| 8/64 | time: More core infrastructure for timespec64include/ include/ kernel/ | +118 | 0 replies | |
| 9/64 | timekeeping: Convert timekeeping core to use timespec64sinclude/ kernel/ kernel/ +3 more | +109 | 0 replies | |
| 10/64 | time: Consolidate the time accessor prototypesinclude/ include/ include/ +6 more | +111 | 0 replies | |
| 11/64 | timekeeping: Provide timespec64 based interfacesinclude/ kernel/ kernel/ | +87 | 0 replies | |
| 12/64 | timekeeper: Move tk_xtime to core codeinclude/ kernel/ | +43 | 2 replies | |
| 13/64 | timekeeping: Cache optimize struct timekeeperinclude/ kernel/ | +143 | 0 replies | |
| 14/64 | timekeeping: Use timekeeping_update() instead of memcpy()kernel/ | +1 | 0 replies | |
| 15/64 | timekeeping: Provide internal ktime_t based datainclude/ kernel/ | +25 | 0 replies | |
| 16/64 | timekeeping: Use ktime_t based data for ktime_get()kernel/ | +5 | 0 replies | |
| 17/64 | timekeeping: Provide ktime_get_with_offset()include/ kernel/ | +36 | 0 replies | |
| 18/64 | timekeeping: Use ktime_t based data for ktime_get_real()include/ kernel/ | +8 | 0 replies | |
| 19/64 | timekeeping; Use ktime_t based data for ktime_get_boottime()include/ kernel/ | +11 | 0 replies | |
| 20/64 | timekeeping: Use ktime_t based data for ktime_get_clocktai()include/ kernel/ | +8 | 0 replies | |
| 21/64 | timekeeping: Use ktime_t data for ktime_get_update_offsets_now()kernel/ | +4 | 0 replies | |
| 22/64 | timekeeping; Use ktime based data for ktime_get_update_offsets_tick()kernel/ | +6 | 0 replies | |
| 23/64 | timekeeping: Provide ktime_mono_to_any()include/ kernel/ | +29 | 0 replies | |
| 24/64 | timerfd: Use ktime_mono_to_real()fs/ | +3 | 0 replies | |
| 25/64 | input: evdev: Use ktime_mono_to_real()drivers/ | +3 | 0 replies | |
| 26/64 | drm: Use ktime_mono_to_real()drivers/ | +3 | 0 replies | |
| 27/64 | timekeeping: Remove ktime_get_monotonic_offset()include/ kernel/ | +0 | 0 replies | |
| 28/64 | timekeeping: Provide ktime_get[*]_ns() helpersinclude/ | +15 | 0 replies | |
| 29/64 | time: Export nsecs_to_jiffies()kernel/ | +1 | 0 replies | |
| 30/64 | sched: Make task->real_start_time nanoseconds basedfs/ include/ kernel/ | +3 | 0 replies | |
| 31/64 | sched: Make task->start_time nanoseconds basedinclude/ kernel/ kernel/ +1 more | +14 | 0 replies | |
| 32/64 | delayacct: Make accounting nanosecond basedinclude/ kernel/ | +14 | 0 replies | |
| 33/64 | delayacct: Remove braindamaged type conversionskernel/ | +7 | 0 replies | |
| 34/64 | powerpc: cell: Use ktime_get_ns()arch/ arch/ arch/ +1 more | +6 | 0 replies | |
| 35/64 | connector: Use ktime_get_ns()drivers/ | +9 | 1 reply | |
| 36/64 | mfd: cros_ec_spi: Use ktime_get_ns()drivers/ | +2 | 0 replies | |
| 37/64 | misc: ioc4: Use ktime_get_ns()drivers/ | +2 | 0 replies | |
| 38/64 | net: mlx5: Use ktime_get_ns()drivers/ include/ | +6 | 0 replies | |
| 39/64 | fs: lockd: Use ktime_get_ns()fs/ | +1 | 0 replies | |
| 40/64 | hwmon: ibmaem: Use ktime_get_ns()drivers/ | +2 | 2 replies | |
| 41/64 | iio: Use ktime_get_real_ns()include/ | +1 | 0 replies | |
| 42/64 | arm: bL_switcher:k Use ktime_get_real_ns()arch/ | +3 | 0 replies | |
| 43/64 | x86: kvm: Use ktime_get_boot_ns()arch/ | +1 | 1 reply | |
| 44/64 | x86: kvm: Make kvm_get_time_and_clockread() nanoseconds basedarch/ | +14 | 1 reply | |
| 45/64 | timekeeping: Remove monotonic_to_bootbasedinclude/ kernel/ | +0 | 0 replies | |
| 46/64 | timekeeping: Use ktime_get_boottime() for get_monotonic_boottime()include/ kernel/ | +8 | 0 replies | |
| 47/64 | timekeeping: Simplify getboottime()kernel/ | +2 | 0 replies | |
| 48/64 | timekeeping: Remove timekeeper.total_sleep_timeinclude/ kernel/ | +5 | 0 replies | |
| 49/64 | timekeeping: Simplify timekeeping_clocktai()include/ kernel/ | +5 | 0 replies | |
| 50/64 | hangcheck-timer: Use ktime_get_ns()drivers/ | +5 | 1 reply | |
| 51/64 | timekeeping: Provide ktime_get_raw()include/ include/ kernel/ | +34 | 0 replies | |
| 52/64 | drm: i915: Use nsec based interfacesdrivers/ drivers/ drivers/ | +18 | 0 replies | |
| 53/64 | drm: vmwgfx: Use nsec based interfacesdrivers/ drivers/ | +16 | 0 replies | |
| 54/64 | wireless: ath9k: Get rid of timespec conversionsdrivers/ | +2 | 0 replies | |
| 55/64 | clocksource: Make delta calculation a functionkernel/ kernel/ kernel/ | +27 | 0 replies | |
| 56/64 | clocksource: Move cycle_last validation to core codearch/ arch/ kernel/ +1 more | +24 | 0 replies | |
| 57/64 | clocksource: Get rid of cycle_lastarch/ arch/ arch/ +7 more | +24 | 0 replies | |
| 58/64 | timekeeping: Restructure the timekeeper some moreinclude/ kernel/ | +19 | 0 replies | |
| 59/64 | timekeeping: Create struct tk_read_base and use it in struct timekeeperarch/ arch/ arch/ +4 more | +158 | 0 replies | |
| 60/64 | timekeeping: Use tk_read_base as argument for timekeeping_get_ns()kernel/ | +11 | 0 replies | |
| 61/64 | seqcount: Provide raw_read_seqcount()include/ | +16 | 0 replies | |
| 62/64 | seqcount: Add raw_write_seqcount_latch()include/ | +11 | 0 replies | |
| 63/64 | timekeeping: Provide fast and NMI safe access to CLOCK_MONOTONICinclude/ kernel/ | +126 | 0 replies | |
| 64/64 | ftrace: Provide trace clocks monotonickernel/ | +6 | 2 replies |
Reviews trailers per patch
11 of 64 patches have a Reviewed-by or Acked-by.
| Patch | Geert Uytterhoeven | Lee Jones | Jonathan Cameron | Daniel Vetter | Trond Myklebust | Arnd Bergmann | Greg Kroah-Hartman | Paolo Bonzini | Jean Delvare |
|---|---|---|---|---|---|---|---|---|---|
| 1/64 | |||||||||
| 2/64 | A-b | ||||||||
| 3/64 | |||||||||
| 4/64 | |||||||||
| 5/64 | |||||||||
| 6/64 | |||||||||
| 7/64 | |||||||||
| 8/64 | |||||||||
| 9/64 | |||||||||
| 10/64 | |||||||||
| 11/64 | |||||||||
| 12/64 | |||||||||
| 13/64 | |||||||||
| 14/64 | |||||||||
| 15/64 | |||||||||
| 16/64 | |||||||||
| 17/64 | |||||||||
| 18/64 | |||||||||
| 19/64 | |||||||||
| 20/64 | |||||||||
| 21/64 | |||||||||
| 22/64 | |||||||||
| 23/64 | |||||||||
| 24/64 | |||||||||
| 25/64 | |||||||||
| 26/64 | |||||||||
| 27/64 | |||||||||
| 28/64 | |||||||||
| 29/64 | |||||||||
| 30/64 | |||||||||
| 31/64 | |||||||||
| 32/64 | |||||||||
| 33/64 | |||||||||
| 34/64 | A-b | ||||||||
| 35/64 | |||||||||
| 36/64 | A-b | ||||||||
| 37/64 | A-b | A-b | |||||||
| 38/64 | |||||||||
| 39/64 | A-b | ||||||||
| 40/64 | A-b | ||||||||
| 41/64 | A-b | ||||||||
| 42/64 | |||||||||
| 43/64 | A-b | ||||||||
| 44/64 | A-b | ||||||||
| 45/64 | |||||||||
| 46/64 | |||||||||
| 47/64 | |||||||||
| 48/64 | |||||||||
| 49/64 | |||||||||
| 50/64 | A-b | ||||||||
| 51/64 | |||||||||
| 52/64 | A-b | ||||||||
| 53/64 | |||||||||
| 54/64 | |||||||||
| 55/64 | |||||||||
| 56/64 | |||||||||
| 57/64 | |||||||||
| 58/64 | |||||||||
| 59/64 | |||||||||
| 60/64 | |||||||||
| 61/64 | |||||||||
| 62/64 | |||||||||
| 63/64 | |||||||||
| 64/64 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 9 reviewers.
Cover letter [patch V2 00/64] timekeeping: 2038, optimizations, NMI safe accessors
Changes versus V1 [http://lkml.kernel.org/r/[email protected]]
- Addressed review comments and testing fallout
- Simplified update of the ktime_t data in the timekeeper
- Replaced some more interfaces which are availabe as timespec and ktime_t by the ktime_t version to get rid of the duplicated data.
- Restructured the timekeeper again to share code with the NMI safe accessor, which simplifies the update to pure memcpy().
- Removed the monotonic raw fast accessor
I also verified the size impact of the whole endavour:
x86_64:
text data bss dec hex filename
before:
992378 104211 454784 1551373 17ac0d ../build/kernel/built-in.o
2038 changes only:
992312 104211 454784 1551307 17abcb ../build/kernel/built-in.o
full series applied:
991724 104210 454976 1550910 17aa3e ../build/kernel/built-in.o
i386:
text data bss dec hex filename
before:
910278 56201 372436 1338915 146e23 ../build-i386/kernel/built-in.o
2038 changes only:
912381 56201 372468 1341050 14767a ../build-i386/kernel/built-in.o
full series applied:
911607 56200 372596 1340403 1473f3 ../build-i386/kernel/built-in.o
arm:
text data bss dec hex filename
before:
443444 58965 7813144 8315553 7ee2a1 ../build-arm/kernel/built-in.o
2038 changes only:
445205 58965 7813176 8317346 7ee9a2 ../build-arm/kernel/built-in.o
full series applied:
444708 58964 7813368 8317040 7ee870 ../build-arm/kernel/built-in.o
So on x8664 the new functionality comes with smaller size. I whish I could say the same for 32bit, but there we pay the prize for making the core timekeeping code 2038 ready. But also there, while the 2038 stuff adds ~2k, the rest (cleanup and the new monotonic accessor) removes ~0.5k again. So features are not necessarily bundled with bloat :)
The series is against tip/timers/core. It's also available in git at:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git tglx/timers/core
Thanks,
tglx
----
arch/arm/Kconfig | 1 arch/arm/common/bL_switcher.c | 16 arch/arm64/kernel/vdso.c | 10 arch/hexagon/Kconfig | 1 arch/ia64/kernel/time.c | 4 arch/powerpc/kernel/time.c | 4 arch/powerpc/platforms/cell/spu_base.c | 11 arch/powerpc/platforms/cell/spufs/context.c | 4 arch/powerpc/platforms/cell/spufs/file.c | 4 arch/powerpc/platforms/cell/spufs/sched.c | 4 arch/s390/Kconfig | 1 arch/s390/kernel/time.c | 16 arch/tile/kernel/time.c | 13 arch/tile/kernel/vdso/vgettimeofday.c | 7 arch/x86/Kconfig | 2 arch/x86/kernel/tsc.c | 21 arch/x86/kernel/vsyscall_gtod.c | 23 arch/x86/kvm/x86.c | 62 - drivers/char/hangcheck-timer.c | 33 drivers/connector/cn_proc.c | 36 drivers/gpu/drm/drm_irq.c | 16 drivers/gpu/drm/i915/i915_drv.h | 2 drivers/gpu/drm/i915/i915_gem.c | 33 drivers/gpu/drm/i915/intel_pm.c | 12 drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 4 drivers/gpu/drm/vmwgfx/vmwgfx_marker.c | 44 - drivers/hwmon/ibmaem.c | 6 drivers/input/evdev.c | 7 drivers/mfd/cros_ec_spi.c | 8 drivers/misc/ioc4.c | 7 drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 16 drivers/net/wireless/ath/ath9k/hw.c | 7 fs/lockd/mon.c | 4 fs/proc/array.c | 7 fs/timerfd.c | 6 include/linux/clocksource.h | 2 include/linux/hrtimer.h | 14 include/linux/iio/iio.h | 9 include/linux/ktime.h | 228 +----- include/linux/mlx5/driver.h | 4 include/linux/sched.h | 8 include/linux/seqlock.h | 27 include/linux/time.h | 65 - include/linux/time64.h | 191 +++++ include/linux/timekeeper_internal.h | 144 ++- include/linux/timekeeping.h | 209 +++++ kernel/acct.c | 10 kernel/delayacct.c | 52 - kernel/fork.c | 5 kernel/time/Kconfig | 9 kernel/time/clocksource.c | 12 kernel/time/hrtimer.c | 80 -- kernel/time/ntp.c | 15 kernel/time/ntp_internal.h | 2 kernel/time/posix-timers.c | 2 kernel/time/tick-internal.h | 2 kernel/time/time.c | 64 + kernel/time/timekeeping.c | 957 ++++++++++++++------------ kernel/time/timekeeping.h | 20 kernel/time/timekeeping_debug.c | 2 kernel/time/timekeeping_internal.h | 17 kernel/trace/trace.c | 11 kernel/tsacct.c | 19 63 files changed, 1412 insertions(+), 1220 deletions(-)