From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: linux-pm@vger.kernel.org
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
Len Brown <len.brown@intel.com>, Pavel Machek <pavel@kernel.org>,
Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Subject: [PATCH 0/7] Update last busy timestamp in Runtime PM autosuspend callbacks
Date: Thu, 10 Apr 2025 18:30:59 +0300 [thread overview]
Message-ID: <20250410153106.4146265-1-sakari.ailus@linux.intel.com> (raw)
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
next reply other threads:[~2025-04-10 15:31 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-10 15:30 Sakari Ailus [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250410153106.4146265-1-sakari.ailus@linux.intel.com \
--to=sakari.ailus@linux.intel.com \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=len.brown@intel.com \
--cc=linux-pm@vger.kernel.org \
--cc=pavel@kernel.org \
--cc=rafael@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.