From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: "Linux-pm mailing list" <linux-pm@lists.linux-foundation.org>,
linux-omap@vger.kernel.org, Kevin Hilman <khilman@ti.com>,
Paul Walmsley <paul@pwsan.com>,
Magnus Damm <magnus.damm@gmail.com>,
LKML <linux-kernel@vger.kernel.org>, Tejun Heo <tj@kernel.org>
Subject: Re: [linux-pm] calling runtime PM from system PM methods
Date: Mon, 20 Jun 2011 21:53:59 +0200 [thread overview]
Message-ID: <201106202153.59329.rjw@sisk.pl> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1106201028470.2113-100000@iolanthe.rowland.org>
On Monday, June 20, 2011, Alan Stern wrote:
> On Sun, 19 Jun 2011, Rafael J. Wysocki wrote:
>
> > In the meantime I rethought the __pm_runtime_disable() part of my previous
> > patch and I now think it's not necessary to complicate it any more. Of course,
> > we need not check if runtime resume is pending in __device_suspend(), because
> > we've done it already in dpm_prepare(), but the barrier part should better be
> > done in there too.
>
> Does this really make sense? What use is a barrier in dpm_prepare() if
> runtime PM is allowed to continue functioning up to the
> suspend callback?
It checks if a resume request is pending and executes runtime resume in that
case.
> As I see it, we never want a suspend or suspend_noirq callback to call
> pm_runtime_suspend(). However it's okay for the suspend callback to
> invoke pm_runtime_resume(), as long as this is all done in subsystem
> code.
First off, I don't really see a reason for a subsystem to call
pm_runtime_resume() from its .suspend_noirq() callback. Now, if
pm_runtime_resume() is to be called concurrently with the subsystem's
.suspend_noirq() callback, I'd rather won't let that happen. :-)
> And in between the prepare and suspend callbacks, runtime PM should be
> more or less fully functional, right? For most devices it will never
> be triggered, because it has to run in process context and both
> userspace and pm_wq are frozen. It may trigger for devices marked as
> IRQ-safe, though.
It also may trigger for drivers using non-freezable workqueues and calling
runtime PM synchronously from there.
> Maybe the barrier should be moved into __device_suspend().
I _really_ think that the initial approach, i.e. before commit
e8665002477f0278f84f898145b1f141ba26ee26, made the most sense. It didn't
cover the "pm_runtime_resume() called during system suspend" case, but
it did cover everything else.
So, I think there are serious technical arguments for reverting that commit.
I think we went really far trying to avoid that, but I'm not sure I want to go
any further.
Thanks,
Rafael
prev parent reply other threads:[~2011-06-20 19:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.LNX.4.44L0.1106181123050.29370-100000@netrider.rowland.org>
2011-06-18 21:01 ` [linux-pm] calling runtime PM from system PM methods Rafael J. Wysocki
2011-06-18 23:57 ` Rafael J. Wysocki
2011-06-19 1:42 ` Alan Stern
2011-06-19 14:04 ` Rafael J. Wysocki
2011-06-19 15:01 ` Alan Stern
2011-06-19 19:36 ` Rafael J. Wysocki
2011-06-20 14:39 ` Alan Stern
2011-06-20 19:53 ` Rafael J. Wysocki [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=201106202153.59329.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=khilman@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=magnus.damm@gmail.com \
--cc=paul@pwsan.com \
--cc=stern@rowland.harvard.edu \
--cc=tj@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