Re: [PATCH 0/3] PM: runtime: add new runtime metrics and summary
From: Joshua Crofts
Date: Wed Nov 11 2026 - 04:23:06 EST
On Tue, 10 Nov 2026 19:38:39 -0800
Samuel Wu <wusamuel@xxxxxxxxxx> wrote:
...
>
> What is the vision for using these runtime PM stats once surfaced to
> userspace? Runtime PM and suspend have disjoint portions, but I'm
> curious if you see any non-obvious areas where these stats would be
> insightful.
The main things this is useful for are detecting power "thrashing" and
tuning autosuspend delays. Currently, sysfs only shows the total time
a device spent in active and suspended mode; from an energy standpoint,
a continuous 50 second suspension is different from a device cycling
1000 times for 50ms each (these transitions can be pretty power-hungry).
This could help userspace utilities like PowerTOP to more effectively
determine what is causing an increased power consumption.
From the kernel dev standpoint - this is genuinely useful when testing
runtime PM functions in new drivers (for example in the IIO subsystem we
deal with a lot of runtime PM stuff).
> And is there a reason the stats need to be surfaced in both sysfs and debugfs?
sysfs definitely, as you should definitely be able to access this info
per-device (and this is the way userspace tools would get this info).
The debugfs summary is however pretty elegant IMO and useful. I'm sure a lot
of people investigating odd device behaviour would like this (plus there
are overviews like this in the kernel already - clk_summary for example).
I'll add these points to the cover letter in v2.
Thanks.
--
Kind regards,
Joshua Crofts