PM: runtime: Fix issues related to autosuspend
Get series with b4
b4 am [email protected]Versions newest first
- v2 Latest4 patches 12 repliesIn review
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | PM: runtime: Add memory barrier before reading last_busydrivers/ | +7 | 3 replies | |
| 2/4 | PM: runtime: Avoid suspends without respecting autosuspend delaydrivers/ | +47 | 3 replies | |
| 3/4 | PM: runtime: Update last_busy in all rpm_idle() pathsdrivers/ | +7 | 1 reply | |
| 4/4 | PM: runtime: Update stale pm_runtime_put_sync() kerneldoc commentinclude/ | +3 | 2 replies |
Reviews trailers per patch
All 4 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Brian Norris | Ulf Hansson |
|---|---|---|
| Series | R-b | |
| 1/4 | R-b | |
| 2/4 | R-b | |
| 3/4 | R-b | |
| 4/4 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/4] PM: runtime: Fix issues related to autosuspend
Hi All,
This is a follow-up series for
which is in linux-next and it replaces
https://lore.kernel.org/linux-pm/[email protected]/
(hence v2).
First of all, there is a potential issue with respecting autosuspend delays in pm_runtime_put_autosuspend() and pm_runtime_put_sync_autosuspend() that existed before the above commit, which is addressed in the first patch, and that fix is relevant for the other patches in the series.
Second, the commit above overlooked some cases in which a running autosuspend timer may trigger between dropping a runtime PM reference to a device and updating its last_busy timestamp, which may cause the device to suspend without respecting its autosuspend delay. Those cases are addressed by the second patch.
Next, I was mistaken when I wrote this in the changelog of the above commit:
Updating the last_busy timestamp when rpm_idle() returns an error without calling rpm_suspend() is not useful because the device is then going to remain active for an unknown amount of time and its autosuspend delay needs to take effect later.
There actually is a reason for doing this which is that an autosuspend timer (left behind by an intermediate runtime resume) may be running when rpm_idle() runs and that autosuspend timer needs to be prevented from using a soon-to-be-stale last_busy timestamp value. That is addressed by the 3rd patch.
Finally, the last patch updates a kerneldoc comment that has become outdated after the commit above.
For details, please see the patch changelogs.
Thanks!