clocksource...spend_timing(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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:


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