From: Brian Norris <briannorris@chromium.org>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Linux PM <linux-pm@vger.kernel.org>,
Alan Stern <stern@rowland.harvard.edu>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Ulf Hansson <ulf.hansson@oss.qualcomm.com>,
Linux Driver Core Development <driver-core@lists.linux.dev>
Subject: Re: [PATCH v2 4/4] PM: runtime: Update stale pm_runtime_put_sync() kerneldoc comment
Date: Mon, 30 Nov 2026 14:39:09 -0800 [thread overview]
Message-ID: <aw37DdotgnnweR5O@google.com> (raw)
In-Reply-To: <23323169.EfDdHjke4D@rafael.j.wysocki>
On Tue, Nov 24, 2026 at 04:39:01PM +0100, Rafael J. Wysocki wrote:
> From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
>
> The pm_runtime_put_sync() kerneldoc comment still claims that it does not
> update the last access time which is not correct any more. Also the
> suggestion to use pm_runtime_put_sync_autosuspend() or instead of
> pm_runtime_put_sync() for devices with autosuspend enabled is outdated.
>
> Make that kerneldoc comment more up to date.
>
> Fixes: 26236a3e8803 ("PM: runtime: Update last_busy before calling rpm_suspend() in rpm_idle()")
> Reported-by: Brian Norris <briannorris@chromium.org>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
We're halfway between recommending using the autosuspend() variants, and
not. e.g., pm_runtime_put_sync_autosuspend() still says, "Prefer this
API over pm_runtime_put_sync() for devices that use autosuspend", while
you're (rightfully) changing pm_runtime_put_sync()'s recommendations to
be a bit weaker. And there's even more in
Documentation/power/runtime_pm.rst that suggests using the autosuspend()
variation.
But that's a larger thing to rework in the docs. We could either wait
until we remove .runtime_idle() (so there are zero differences), or we
could start changing recommendations to the rpm_idle()-based helpers
(since they are a superset of rpm_suspend()-based / *_autosuspend()
helpers) right now.
This is more a request for input, rather than a request for you to
change things. Perhaps I can take another pass at the docs, pending your
input. In any case, this is a fine start IMO:
Reviewed-by: Brian Norris <briannorris@chromium.org>
> New patch in v2.
>
> ---
> include/linux/pm_runtime.h | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h
> index 7972bfb90d6c..3f593a783e17 100644
> --- a/include/linux/pm_runtime.h
> +++ b/include/linux/pm_runtime.h
> @@ -692,9 +692,9 @@ DEFINE_GUARD_COND(pm_runtime_active_auto, _try_enabled,
> * Decrement the runtime PM usage counter of @dev. If the counter drops to zero,
> * synchronously evaluate and trigger idle/suspend handling.
> *
> - * Note that this does not update the last access time, but it does respect
> - * existing autosuspend timers. If @dev uses autosuspend, consider using
> - * pm_runtime_put_sync_autosuspend() or pm_runtime_put_sync_suspend() instead.
> + * This updates the last access time and respects existing autosuspend timers.
> + * If @dev uses autosuspend and respecting its autosuspend delay is not
> + * desirable, consider using pm_runtime_put_sync_suspend() instead.
> *
> * The runtime PM usage counter of @dev remains decremented in all cases, even
> * if it returns an error code.
> --
> 2.51.0
>
>
>
>
next prev parent reply other threads:[~2026-11-30 22:39 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
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-26 1:43 ` Brian Norris
2026-11-26 14:04 ` Rafael J. Wysocki (Intel)
2026-11-30 22:36 ` Brian Norris
2026-11-24 15:35 ` [PATCH v2 2/4] PM: runtime: Avoid suspends without respecting autosuspend delay Rafael J. Wysocki
2026-11-30 22:38 ` Brian Norris
2026-11-30 22:59 ` Brian Norris
2026-11-24 15:37 ` [PATCH v2 3/4] PM: runtime: Update last_busy in all rpm_idle() paths Rafael J. Wysocki
2026-11-30 22:31 ` Brian Norris
2026-11-24 15:39 ` [PATCH v2 4/4] PM: runtime: Update stale pm_runtime_put_sync() kerneldoc comment Rafael J. Wysocki
2026-11-30 22:39 ` Brian Norris [this message]
2026-11-26 11:51 ` [PATCH v2 0/4] PM: runtime: Fix issues related to autosuspend Ulf Hansson
2026-11-26 12:50 ` Rafael J. Wysocki (Intel)
2026-11-26 13:28 ` Ulf Hansson
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=aw37DdotgnnweR5O@google.com \
--to=briannorris@chromium.org \
--cc=driver-core@lists.linux.dev \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=stern@rowland.harvard.edu \
--cc=ulf.hansson@oss.qualcomm.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox