From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: Oliver Neukum <oneukum@suse.com>
Cc: linux-pm@vger.kernel.org, "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: Re: [PATCH v2 0/6] Update last busy timestamp in Runtime PM autosuspend callbacks
Date: Wed, 25 Jun 2025 06:59:51 +0000 [thread overview]
Message-ID: <aFueZ_xfnbrQO0Wx@kekkonen.localdomain> (raw)
In-Reply-To: <4433c6e5-44d4-49e7-a034-aefb9a0ff538@suse.com>
Hi Oliver,
On Mon, Jun 23, 2025 at 03:28:45PM +0200, Oliver Neukum wrote:
> On 16.06.25 08:12, Sakari Ailus wrote:
> > Folks,
>
> Hi,
> > 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.
>
> Now that I think about this, I am not sure of the logic behind this.
> It seems to me that you are making marking a device busy and dropping
> the reference synonymous.
>
> Is the time you use to derive the likelihood determined by the start
> of IO or the end of IO?
The purpose of autosuspend is to delay device suspend in case it might be
used again soon after the point of dropping Runtime PM usage_count. Are
there cases you're aware of where pm_runtime_mark_last_busy() isn't
directly followed pm_runtime_put_autosuspend() or one of its variants and
it is desirable? Just stamping the last busy timestamp is a trivial
operation so one or two extra in a few places isn't really a problem.
--
Kind regards,
Sakari Ailus
prev parent reply other threads:[~2025-06-25 6:59 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-16 6:12 [PATCH v2 0/6] Update last busy timestamp in Runtime PM autosuspend callbacks Sakari Ailus
2025-06-16 6:12 ` [PATCH v2 1/6] pm: runtime: Document return values of suspend related API functions Sakari Ailus
2025-08-14 22:56 ` Brian Norris
2025-08-29 0:46 ` Brian Norris
2025-08-29 10:23 ` Sakari Ailus
2025-06-16 6:12 ` [PATCH v2 2/6] pm: runtime: Mark last busy stamp in pm_runtime_put_autosuspend() Sakari Ailus
2025-06-16 6:12 ` [PATCH v2 3/6] pm: runtime: Mark last busy stamp in pm_runtime_put_sync_autosuspend() Sakari Ailus
2025-06-16 6:12 ` [PATCH v2 4/6] pm: runtime: Mark last busy stamp in pm_runtime_autosuspend() Sakari Ailus
2025-06-16 6:12 ` [PATCH v2 5/6] pm: runtime: Mark last busy stamp in pm_request_autosuspend() Sakari Ailus
2025-06-16 6:12 ` [PATCH v2 6/6] Documentation: PM: *_autosuspend() functions update last busy time Sakari Ailus
2025-06-16 11:21 ` [PATCH v2 0/6] Update last busy timestamp in Runtime PM autosuspend callbacks Rafael J. Wysocki
2025-06-16 19:20 ` Sakari Ailus
2025-06-16 20:10 ` Laurent Pinchart
2025-06-18 19:43 ` Rafael J. Wysocki
2025-06-25 9:15 ` Sakari Ailus
2025-06-23 13:28 ` Oliver Neukum
2025-06-25 6:59 ` Sakari Ailus [this message]
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=aFueZ_xfnbrQO0Wx@kekkonen.localdomain \
--to=sakari.ailus@linux.intel.com \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=len.brown@intel.com \
--cc=linux-pm@vger.kernel.org \
--cc=oneukum@suse.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox