clocksource...spend_timing(9)
π
clocksource_stop_suspend_timing β clocksource...spend_timing(9) π
okay so we're in the Kernel API Manual, bestie, and this page is the main character: clocksource...spend_timing(9). No cap. π
π NAME π
clocksource_stop_suspend_timing β Stop measuring the suspend timing. That's the whole vibe. β¨
πΈ SYNOPSIS πΈ
u64 clocksource_stop_suspend_timing (struct clocksource *cs , u64
cycle_now );
π¦ ARGUMENTS π¦
csβ current clocksource from timekeeping. π«cycle_nowβ current cycles from timekeeping. β±οΈ
β¨ DESCRIPTION β¨
So this function will calculate the suspend time from suspend timer. That's it, that's the job. π
Returns nanoseconds since suspend started, and 0 if there's no usable suspend clocksource. periodt.
It's called early in the resume process from timekeeping_resume β and when I say early, I mean only one cpu, no processes are running, and the interrupts are disabled. π So yeah, it is therefore possible to stop the suspend timer without taking the clocksource mutex. The mutex can stay unbothered, iykyk. π«Ά
π SEE ALSO π
Kernel file ./kernel/time/clocksource.c and the whole function friend group:
clocks_calc_mult_shift(9)clocksource_mark_unstable(9)clocksource_suspend_select(9)clocksource_start_suspend_timing(9)clocksource_suspend(9)clocksource_resume(9)clocksource_touch_watchdog(9)clocksource_max_adjustment(9)clocks_calc_max_nsecs(9)clocksource_update_max_deferment(9)clocksource_select(9)__clocksource_update_freq_scale(9)__clocksource_register_scale(9)clocksource_unregister(9)current_clocksource_show(9)current_clocksource_store(9)unbind_clocksource_store(9)available_clocksource_show(9)boot_override_clocksource(9)boot_override_clock(9)
and that's the page, bestie! π This one's from ./kernel/time, dated October 2026, and it's the clocksource...spend_timing(9) page. Slay and goodbye! π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms