From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: linux-pm@lists.linux-foundation.org
Subject: Re: Question about expected behavior when PM runtime is disabled
Date: Fri, 17 Jun 2011 21:29:42 +0200 [thread overview]
Message-ID: <201106172129.42995.rjw@sisk.pl> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1106171103020.2143-100000@iolanthe.rowland.org>
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).
Thanks,
Rafael
next prev parent reply other threads:[~2011-06-17 19:29 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 [this message]
2011-06-20 23:21 ` Kevin Hilman
2011-06-20 23:27 ` Rafael J. Wysocki
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=201106172129.42995.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=linux-pm@lists.linux-foundation.org \
--cc=stern@rowland.harvard.edu \
/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