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 2/4] PM: runtime: Avoid suspends without respecting autosuspend delay
Date: Mon, 30 Nov 2026 14:59:48 -0800 [thread overview]
Message-ID: <aw3_5A9wlL9-Z5gO@google.com> (raw)
In-Reply-To: <aw3635h4xXhLGlWF@google.com>
On Mon, Nov 30, 2026 at 02:38:23PM -0800, Brian Norris wrote:
> On Tue, Nov 24, 2026 at 04:35:08PM +0100, Rafael J. Wysocki wrote:
> > @@ -333,6 +336,16 @@ void pm_runtime_release_supplier(struct device_link *link)
> > {
> > struct device *supplier = link->supplier;
> >
> > + /*
> > + * Since rpm_suspend() may run as a whole right after the loop below,
> > + * prevent it from suspending the supplier without respecting its
> > + * autosuspend delay. The last_busy update cannot be reordered with
> > + * the usage counter update in pm_runtime_put_noidle(), which is fully
> > + * ordered and pairs with the read memory barrier in
> > + * pm_runtime_autosuspend_expiration().
> > + */
> > + pm_runtime_mark_last_busy(supplier);
[...]
> Perhaps this this last_busy update should go inside the 'if'? Or
> otherwise refactor this function to be less subtle.
Sorry, there's no 'if' in pm_runtime_release_supplier() -- it's a
'while' loop.
We could move it into the 'while', although that'd probably induce
redundant mark_last_busy updates. So perhaps the "otherwise refactor"
option would be more attractive?
Brian
P.S. My redundant "this this" is a bit ironic :)
next prev parent reply other threads:[~2026-11-30 22:59 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 [this message]
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
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=aw3_5A9wlL9-Z5gO@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