public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Kevin Hilman <khilman@ti.com>
Cc: linux-pm@lists.linux-foundation.org
Subject: Re: Question about expected behavior when PM runtime is disabled
Date: Tue, 21 Jun 2011 01:27:13 +0200	[thread overview]
Message-ID: <201106210127.13439.rjw@sisk.pl> (raw)
In-Reply-To: <87sjr45bt9.fsf@ti.com>

On Tuesday, June 21, 2011, Kevin Hilman wrote:
> "Rafael J. Wysocki" <rjw@sisk.pl> writes:
> 
> > On Friday, June 17, 2011, Alan Stern wrote:
> >> On Tue, 14 Jun 2011, Rafael J. Wysocki wrote:
> >> 
> >> > > Then you suggest:
> >> > > 
> >> > > 	Call pm_runtime_disable after .suspend;
> >> > > 
> >> > > 	Call pm_runtime_get_noresume and pm_runtime_enable before
> >> > > 	.resume;
> >> > > 
> >> > > 	Call pm_runtime_put_sync after .complete.
> >> > > 
> >> > > Right?
> >> > 
> >> > Yes, that would be resonable IMO.
> >> 
> >> This turns out to be harder than it looks.  If an error occurs, we may
> >> run the complete callback for devices that never were suspended or
> >> resumed and hence never had their usage_count incremented.  How can we
> >> tell that we need to skip the pm_runtime_put_sync for these devices?
> >> 
> >> Would it be okay to call pm_runtime_put_sync immediately after the
> >> resume callback instead of after complete?
> >
> > Yes, it would.
> >
> > That said we may be better off by simply reverting commit
> > e8665002477f0278f84f898145b1f141ba26ee26 (PM: Allow pm_runtime_suspend() to
> > succeed during system suspend).
> 
> I'm OK with blocking runtime PM requests after .suspend (and unblocking
> before .resume) e.g. protecting the _noirq callbacks, but I hope we
> don't have to go back to blocking them before .prepare (and unblocking
> after .complete)

We probably won't, but I'm not sure about .suspend() and .resume() yet.

Well, there are different things to take into consideration.  Please
see this message, for example: https://lkml.org/lkml/2011/6/20/328 (I should
have CCed it to you, sorry about that).

Thanks,
Rafael

      reply	other threads:[~2011-06-20 23:27 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-10 22:54 Question about expected behavior when PM runtime is disabled Kenneth Heitke
2011-06-11 16:12 ` Alan Stern
2011-06-13 18:42   ` Kenneth Heitke
2011-06-13 19:28     ` Alan Stern
2011-06-13 19:51       ` Rafael J. Wysocki
2011-06-13 20:33         ` Alan Stern
2011-06-13 21:20           ` Rafael J. Wysocki
2011-06-14 13:47             ` Alan Stern
2011-06-14 20:01               ` Rafael J. Wysocki
2011-06-17 15:08                 ` Alan Stern
2011-06-17 19:29                   ` Rafael J. Wysocki
2011-06-20 23:21                     ` Kevin Hilman
2011-06-20 23:27                       ` 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=201106210127.13439.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=khilman@ti.com \
    --cc=linux-pm@lists.linux-foundation.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