update_pm_ru...e_accounting(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– update_pm_ru...e_accounting(9) πŸ’–

okay so bestie, welcome to the Kernel API Manual β€” and yes, the title really is update_pm_ru...e_accounting(9) with the lil ... in the middle, that's not me being lazy, that's just how it's printed, periodt πŸ’…


✨ NAME ✨

update_pm_runtime_accounting β€” literally just updates the time accounting of power states πŸ•’


πŸ¦‹ SYNOPSIS πŸ¦‹

void update_pm_runtime_accounting (struct device *dev );

πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” the device you're doing the accounting for. that's the whole vibe, one (1) device, no cap 🫢

🌸 DESCRIPTION 🌸

okay so here's the tea β˜• β€” if we want time accounting of the various power states (you know, the thing programs like PowerTOP use to show you how effective runtime PM is being), we need to actually track how much time gets spent in each state. no tracking, no stats, no slay πŸ“Š

so update_pm_runtime_accounting has to be called each time before the runtime_status field gets updated β€” that way the time spent in the old state gets accounted correctly. skip it and your numbers are a mess, fr fr 😭

bestie this is an ordering thing. call it before you touch runtime_status, not after. the old state needs its flowers first 🌷

πŸ‘‘ SEE ALSO πŸ‘‘

the kernel file, in all its main-character glory:

  • ./drivers/base/power/runtime.c

and now the whole runtime PM squad roll call β€” every single one of them, in order, no skips πŸ’œ


✨ that's the whole page, bestie ✨ this lil cutie lives in ./drivers/base/power, and the version we're looking at is dated October 2026. go account some time, ily, bye πŸŽ€πŸ’–πŸ¦‹

πŸ“¦ where this page comes from