Linux Power Management development
 help / color / mirror / Atom feed
* [PATCH v2 0/4] PM: runtime: Fix issues related to autosuspend
@ 2026-11-24 15:29 Rafael J. Wysocki
  2026-11-24 15:31 ` [PATCH v2 1/4] PM: runtime: Add memory barrier before reading last_busy Rafael J. Wysocki
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Rafael J. Wysocki @ 2026-11-24 15:29 UTC (permalink / raw)
  To: Linux PM
  Cc: Brian Norris, Alan Stern, Sakari Ailus, Ulf Hansson,
	Linux Driver Core Development

Hi All,

This is a follow-up series for

https://web.git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git/commit/?h=linux-next&id=26236a3e8803f7e1ace104020d7f006edb220116

which is in linux-next and it replaces

https://lore.kernel.org/linux-pm/3076901.e9J7NaK4W3@rafael.j.wysocki/

(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!




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-11-24 15:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-24 15:29 [PATCH v2 0/4] PM: runtime: Fix issues related to autosuspend Rafael J. Wysocki
2026-11-24 15:31 ` [PATCH v2 1/4] PM: runtime: Add memory barrier before reading last_busy Rafael J. Wysocki
2026-11-24 15:35 ` [PATCH v2 2/4] PM: runtime: Avoid suspends without respecting autosuspend delay Rafael J. Wysocki
2026-11-24 15:37 ` [PATCH v2 3/4] PM: runtime: Update last_busy in all rpm_idle() paths Rafael J. Wysocki
2026-11-24 15:39 ` [PATCH v2 4/4] PM: runtime: Update stale pm_runtime_put_sync() kerneldoc comment Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox