All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/7] Update last busy timestamp in Runtime PM autosuspend callbacks
@ 2025-04-10 15:30 Sakari Ailus
  2025-04-10 15:31 ` [PATCH 1/7] Documentation: pm: runtime: Fix a reference to pm_runtime_autosuspend() Sakari Ailus
                   ` (7 more replies)
  0 siblings, 8 replies; 20+ messages in thread
From: Sakari Ailus @ 2025-04-10 15:30 UTC (permalink / raw)
  To: linux-pm; +Cc: Rafael J. Wysocki, Len Brown, Pavel Machek, Laurent Pinchart

Folks,

The original plan for adding pm_runtime_mark_last_busy() calls to
functions dealing with Runtime PM autosuspend originally included a few
intermediate steps of driver conversion, including the use of recently
added __pm_runtime_put_autosuspend(). The review of the set converting the
users first to __pm_runtime_put_autosuspend() concluded this wasn't
necessary. See
<URL:https://lore.kernel.org/all/20241004094101.113349-1-sakari.ailus@linux.intel.com/>.

This set extends the inclusion of the pm_runtime_mark_last_busy() call to
the _autosuspend() variants of the Runtime PM functions dealing with
suspending devices, i.e. pm_runtime_put_autosuspend(),
pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and
pm_request_autosuspend(). This will introduce, for a brief amount of time,
unnecessary calls to pm_runtime_mark_last_busy() but this wasn't seen as
an issue. Also, all users of these functions, including those that did not
call pm_runtime_mark_last_busy(), will now include that call. Presumably
in the vast majority of the cases a missing call would have been a bug.

Once this set is merged, I'll post further patches to remove the extra
pm_runtime_mark_last_busy() calls. The current set of these patches is
here
<URL:https://git.kernel.org/pub/scm/linux/kernel/git/sailus/linux-next.git/log/?h=pm-direct-on-next>.

It'd be best to have all merged within the same cycle.

The changes in the patches to remove the pm_runtime_mark_last_busy() calls
have been generated using the following Coccinelle spatch:

@@
expression E;
identifier label, rval;
@@
- pm_runtime_mark_last_busy(E);
...
(
  label:
|
)
...
(
  pm_runtime_put_autosuspend(E);
|
  pm_runtime_put_sync_autosuspend(E);
|
  pm_runtime_autosuspend(E);
|
  pm_request_autosuspend(E);
|
  (void)pm_runtime_put_autosuspend(E);
|
  (void)pm_runtime_put_sync_autosuspend(E);
|
  (void)pm_runtime_autosuspend(E);
|
  (void)pm_request_autosuspend(E);
|
  return pm_runtime_put_autosuspend(E);
|
  return pm_runtime_put_sync_autosuspend(E);
|
  return pm_runtime_autosuspend(E);
|
  return pm_request_autosuspend(E);
|
  rval = pm_runtime_put_autosuspend(E);
|
  rval = pm_runtime_put_sync_autosuspend(E);
|
  rval = pm_runtime_autosuspend(E);
|
  rval = pm_request_autosuspend(E);
)

Sakari Ailus (7):
  Documentation: pm: runtime: Fix a reference to
    pm_runtime_autosuspend()
  pm: runtime: Document return values of suspend related API functions
  pm: runtime: Mark last busy stamp in pm_runtime_put_autosuspend()
  pm: runtime: Mark last busy stamp in pm_runtime_put_sync_autosuspend()
  pm: runtime: Mark last busy stamp in pm_runtime_autosuspend()
  pm: runtime: Mark last busy stamp in pm_request_autosuspend()
  Documentation: PM: *_autosuspend() functions update last busy time

 Documentation/power/runtime_pm.rst |  50 ++++----
 include/linux/pm_runtime.h         | 187 +++++++++++++++++++++++++----
 2 files changed, 186 insertions(+), 51 deletions(-)

-- 
2.39.5


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

end of thread, other threads:[~2025-06-16  5:51 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-10 15:30 [PATCH 0/7] Update last busy timestamp in Runtime PM autosuspend callbacks Sakari Ailus
2025-04-10 15:31 ` [PATCH 1/7] Documentation: pm: runtime: Fix a reference to pm_runtime_autosuspend() Sakari Ailus
2025-04-10 20:13   ` Laurent Pinchart
2025-04-15 17:27     ` Rafael J. Wysocki
2025-04-10 15:31 ` [PATCH 2/7] pm: runtime: Document return values of suspend related API functions Sakari Ailus
2025-04-10 15:31 ` [PATCH 3/7] pm: runtime: Mark last busy stamp in pm_runtime_put_autosuspend() Sakari Ailus
2025-04-10 20:17   ` Laurent Pinchart
2025-04-11  6:27     ` Sakari Ailus
2025-04-11  6:33       ` Sakari Ailus
2025-04-10 15:31 ` [PATCH 4/7] pm: runtime: Mark last busy stamp in pm_runtime_put_sync_autosuspend() Sakari Ailus
2025-04-10 20:23   ` Laurent Pinchart
2025-06-16  5:51     ` Sakari Ailus
2025-04-10 15:31 ` [PATCH 5/7] pm: runtime: Mark last busy stamp in pm_runtime_autosuspend() Sakari Ailus
2025-04-10 20:27   ` Laurent Pinchart
2025-04-10 15:31 ` [PATCH 6/7] pm: runtime: Mark last busy stamp in pm_request_autosuspend() Sakari Ailus
2025-04-10 20:28   ` Laurent Pinchart
2025-04-10 15:31 ` [PATCH 7/7] Documentation: PM: *_autosuspend() functions update last busy time Sakari Ailus
2025-04-10 20:29   ` Laurent Pinchart
2025-04-29 11:10 ` [PATCH 0/7] Update last busy timestamp in Runtime PM autosuspend callbacks Rafael J. Wysocki
2025-06-16  5:42   ` Sakari Ailus

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.