Hacker News new | ask | show | jobs
by dyingkneepad 2022 days ago
runtime_pm is generally for runtime suspend (Intel calls it s0ix) instead of S3 suspend. You can implement S3 suspend using the same callbacks as your runtime_pm callbacks, but you don't need to.

The runtime_pm framework is for when applications are still running but the device goes to sleep. In S3 suspend first every single user space application freezes, then the drivers go to sleep. S3 is much easier to implement.

1 comments

I think ideally all pm would be controlled by the runtime_pm and qos frameworks. You then don't need to define explicit power states like 'sleep' or 'suspend', you instead simply use what you need for a given performance spec and naturally use a minimum of power. I think that is the ultimate plan
It's not that simple. There's a lot of predicting the future when it comes to power management. When you put things to sleep in order to save power you add latency, because waking up the hardware and restoring its state takes a long time. It's all tradeoffs, and "use minimum power" is taking the slider and shifting it all the way to one side.