~/talk

Timekeeping in the Linux Kernel

links:none on file
slides:none on file

Linux kernel timekeeping maps hardware counters into nanoseconds using a computed clocksource multiplier and shift (clocks_calc_mult) to avoid slow divisions, tracks multiple timelines (MONOTONIC, BOOTTIME, RTC) as offsets from one accumulator across about six to seven files, and applies tiny NTP-like frequency tweaks to correct drift (example: an 8 Hz error yields ~2 ns slip after 100,000 cycles). Tick delivery uses per-CPU one-shot vs periodic clockevents and a global tick-broadcast for dead clockevents (needed on many ARM systems); code is upstream and broadly used.

AI-written summary · about

  1. 0:00Intro
  2. 1:11there was a counter
  3. 6:43POSIX Clocks Comparison
  4. 7:37RAT in Action (Read)
  5. 8:05RAT in Action (Accumulate - Track)
  6. 8:53Juggling Clocks
  7. 9:57Handling Clock Drift
  8. 10:37Mult to the Rescue!
  9. 11:21Making Things Fast and Efficient
  10. 13:10Where We Are
  11. 13:40What if my system doesn't have a counter?
  12. 14:06Let's talk about jiffies
  13. 15:09Implementing the tick in hardware
  14. 15:35Abstract the Hardware!
  15. 17:09Three event_handlers
  16. 17:37Ticks During Ide
  17. 19:23High Resolution Mode
  18. 20:10Tick Devices
  19. 21:17Running the Tick
  20. 22:44Running the Tich Per-CPU
  21. 23:04Stopping the Tick
  22. 24:28Tick Broadcast
  23. 27:29HRTimers
  24. 28:14Summary
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.