From: Phillip Susi <psusi@ubuntu.com>
To: Alan Stern <stern@rowland.harvard.edu>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Aaron Lu <aaron.lu@intel.com>,
Linux-pm mailing list <linux-pm@vger.kernel.org>
Subject: Re: Allow runtime suspend during system resume
Date: Thu, 09 Jan 2014 10:50:46 -0500 [thread overview]
Message-ID: <52CEC556.7030405@ubuntu.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1401091015200.1493-100000@iolanthe.rowland.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 1/9/2014 10:32 AM, Alan Stern wrote:
> I had in mind something more like this for the driver's .resume
> (or .resume_early) routine:
>
> bool leave_suspended = false; int rc = 0;
>
> if (!pm_runtime_in_use(dev) && !disk_is_spinning(dev))
> leave_suspended = true; else rc = spin_up_the_disk(dev);
>
> if (rc == 0) { pm_runtime_disable(dev); if (leave_suspended)
> pm_runtime_set_suspended(dev); else pm_runtime_set_active(dev);
> pm_runtime_enable(dev); } return rc;
We also don't want to block the resume path while the REQUEST SENSE
runs, since it typically takes 10 seconds or so on normal ATA disks.
Thus, the resume or resume early needs to be able to return with the
device left in the transitioning state and complete or abort the
transition later.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQEcBAEBAgAGBQJSzsVVAAoJEI5FoCIzSKrwLGAIAJj3GvPEcwtFvkJ6oAX+4fbf
z75OHkOkKtwOTY1SvqpgyYUMdrsTLRYO5ZPCCzZemow6s24xjEhtHVYONKogZ8Rv
lYzFpsZhWd7pLjHm5PDUSbEJiOvx9Ba+6JbRYGl9rInv2PdJOSscEpN+4a0/bvGU
F72tUfYI58su0RHcee9xXFRBOZkM61DCxNNXAyr+SHa7fIJi5jKrlNSbHPzBXAo0
g/qw8IY86a3SWE4cOGIfsrtL8GpmbwFNkT+BHWhaRlj2wj2VTP5FTZrOHndNL7pU
WC29Qxg2cKhSgm15BhNw3ESjn/3rdFaHsV96ietFKMlavXDqRmmwPsTmNK8Pbuo=
=5AE6
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2014-01-09 15:50 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1384030893.git.psusi@ubuntu.com>
[not found] ` <1387236657-4852-1-git-send-email-psusi@ubuntu.com>
[not found] ` <52CA1191.8060804@ubuntu.com>
[not found] ` <52CA5CF4.2080708@codeaurora.org>
[not found] ` <52CA744F.2080609@intel.com>
[not found] ` <52CAC067.20601@ubuntu.com>
2014-01-07 7:49 ` REQ_PM vs REQ_TYPE_PM_RESUME Aaron Lu
2014-01-07 14:50 ` Phillip Susi
2014-01-08 1:03 ` Aaron Lu
2014-01-08 1:16 ` Phillip Susi
2014-01-08 1:32 ` Aaron Lu
2014-01-08 1:53 ` Phillip Susi
2014-01-08 2:11 ` Aaron Lu
2014-01-08 2:19 ` Phillip Susi
2014-01-08 2:36 ` Aaron Lu
2014-01-08 5:24 ` Phillip Susi
2014-01-08 7:00 ` Aaron Lu
2014-01-08 19:30 ` Phillip Susi
2014-01-07 15:25 ` Alan Stern
2014-01-07 15:43 ` Phillip Susi
2014-01-07 16:08 ` Alan Stern
2014-01-07 16:37 ` Phillip Susi
2014-01-07 18:05 ` Alan Stern
2014-01-07 18:43 ` Phillip Susi
2014-01-07 19:18 ` Alan Stern
2014-01-07 23:47 ` Phillip Susi
2014-01-08 17:46 ` Alan Stern
2014-01-08 18:31 ` Alan Stern
2014-01-08 20:44 ` Allow runtime suspend during system resume Alan Stern
2014-01-08 21:17 ` Phillip Susi
2014-01-08 21:34 ` Alan Stern
2014-01-09 10:14 ` Ulf Hansson
2014-01-09 15:41 ` Alan Stern
2014-01-08 22:55 ` Rafael J. Wysocki
2014-01-08 23:24 ` Alan Stern
2014-01-09 0:05 ` Rafael J. Wysocki
2014-01-09 15:32 ` Alan Stern
2014-01-09 15:50 ` Phillip Susi [this message]
2014-01-09 16:08 ` Alan Stern
2014-01-09 16:30 ` Phillip Susi
2014-01-09 17:04 ` Alan Stern
2014-01-10 1:25 ` Rafael J. Wysocki
2014-01-10 1:55 ` Phillip Susi
2014-01-10 13:35 ` Rafael J. Wysocki
2014-01-10 14:46 ` Phillip Susi
2014-01-10 15:25 ` Alan Stern
2014-01-10 23:02 ` Rafael J. Wysocki
2014-01-11 2:08 ` Phillip Susi
2014-01-11 22:50 ` Alan Stern
2014-01-12 1:50 ` Phillip Susi
2014-01-11 22:34 ` Alan Stern
2014-01-08 20:20 ` REQ_PM vs REQ_TYPE_PM_RESUME Phillip Susi
2014-01-08 21:21 ` Alan Stern
2014-01-08 21:50 ` Phillip Susi
2014-01-09 1:29 ` Aaron Lu
2014-01-09 12:17 ` Rafael J. Wysocki
2014-01-09 13:18 ` Rafael J. Wysocki
2014-01-09 15:40 ` Alan Stern
2014-01-09 15:53 ` Phillip Susi
2014-01-09 16:14 ` Alan Stern
2014-01-09 16:34 ` Phillip Susi
2014-01-09 17:06 ` Alan Stern
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=52CEC556.7030405@ubuntu.com \
--to=psusi@ubuntu.com \
--cc=aaron.lu@intel.com \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--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;
as well as URLs for NNTP newsgroup(s).