From: Todd E Brandt <todd.e.brandt@linux.intel.com>
To: Phillip Susi <psusi@ubuntu.com>
Cc: tj@kernel.org, JBottomley@parallels.com,
linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: Re: [PATCH/RESEND v2 0/2] SATA disk resume time optimization
Date: Fri, 8 Nov 2013 17:20:23 -0800 [thread overview]
Message-ID: <20131109012023.GA8978@linux.intel.com> (raw)
In-Reply-To: <527AF287.7020700@ubuntu.com>
I tested your patches and they do function. We tried a similar approach
a few months back where instead of waking the scsi disks we just set
them all to runtime_suspended and skipped the resume. Then we let
them be awakened later by read/write access just as you have. It's a really
tempting approach, in theory, since you're saving both time and power
by only waking those disks you know you need. But in practice I've found
that userspace doesn't play nice.
In my experience the user layer almost always manages to wake up every
mounted disk after resume, even if you didn't deliberately use them
prior to suspend. The accesses can come from the file manager doing a
scan after resume, or from any number of apps running on the system that
decide they need to get even the smallest piece of information from the
disks. A simple space check will wake them up.
Thus when you leave all the disks stopped, user space ends up triggering
a traffic jam when the OS wakes back up, which makes disk access take even
longer.
My patch works very similarly to yours but just triggers an asynchronous
wakeup to all the disks in anticipation of userspace's needs. We've
tested it pretty heavily on ubuntu machines of all types and it's
done well.
Ultimately I would be happy if either solution were accepted though,
because this is a serious performance problem that needs to be addressed
in some way.
On Wed, Nov 06, 2013 at 08:53:11PM -0500, Phillip Susi wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA512
>
> On 10/17/2013 03:33 PM, Todd E Brandt wrote:
> > The essential issue behind hard disks' lengthy resume time is the
> > ata port driver blocking until the ATA port hardware is finished
> > coming online. So the kernel isn't really doing anything during all
> > those seconds that the disks are resuming, it's just blocking until
> > the hardware says it's ready to accept commands. Applying this
> > patch set
>
> I have been working in a similar direction and have patches to follow.
> Instead of backgrounding the start in sd_resume, I have removed it
> entirely, and background the resume at the ata port layer, as well as
> avoid resuming Power on in Standby disks entirely.
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.14 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQEcBAEBCgAGBQJSevKEAAoJEJrBOlT6nu75FFkIAL8mwXOuuNvY5GoppHVMcweC
> EOBz6t2Xmc/TsGYr9u4kRVXbf3G0trSM9dj/XSJ6p+Dj/su/vJ69yKxp7sUPidgz
> zqjfKlG+myMQIaAO+tPGXvMcmT74BXjgjobZw2lUyLyRPLD9elDGmrDA5ZXZ+hiz
> hzSx4gOC57j+sK/pmoZ7U/CWeWYEYQ+J9xBXm0hzbBbSTjpzVsR0T+7xU+WVkeX0
> Ox++FFBZp2b1xJgaREurRv1mORx/GJ+PfSETb49P5BWaWW+QVwOEhWOX/JQNc/Pp
> ANJmttP4WPvlRV0X3hD6FvAYSnu1qbwwGOiP/j5g7mklyfm5alA0jcuahc1w5tI=
> =9KhA
> -----END PGP SIGNATURE-----
next prev parent reply other threads:[~2013-11-09 1:20 UTC|newest]
Thread overview: 101+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-17 19:33 [PATCH/RESEND v2 0/2] SATA disk resume time optimization Todd E Brandt
2013-11-07 1:53 ` Phillip Susi
2013-11-07 1:57 ` [PATCH 1/3] sd: don't bother spinning up disks on resume Phillip Susi
2013-11-07 18:21 ` Douglas Gilbert
2013-11-07 21:16 ` Phillip Susi
2013-11-16 18:20 ` James Bottomley
2013-11-17 3:50 ` Phillip Susi
2013-11-17 6:43 ` James Bottomley
2013-11-17 16:15 ` Phillip Susi
2013-11-17 23:54 ` Douglas Gilbert
2013-11-18 1:06 ` Phillip Susi
2013-11-18 15:54 ` Phillip Susi
2013-11-20 14:23 ` Mark Lord
2013-11-20 14:48 ` Phillip Susi
2013-11-28 1:39 ` Phillip Susi
2013-11-18 0:09 ` James Bottomley
2013-11-18 1:11 ` Phillip Susi
2013-11-16 5:23 ` Mark Lord
2013-11-16 14:52 ` Phillip Susi
2013-11-07 1:57 ` [PATCH 2/3] libata: resume in the background Phillip Susi
2013-11-07 1:57 ` [PATCH 3/3] libata: don't start disks on resume Phillip Susi
2013-11-09 1:20 ` Todd E Brandt [this message]
2013-11-09 20:59 ` [PATCH/RESEND v2 0/2] SATA disk resume time optimization Phillip Susi
2013-11-09 21:03 ` [PATCH 0/6] Let sleeping disks lie Phillip Susi
2013-12-16 23:30 ` Phillip Susi
2013-12-16 23:30 ` [PATCH 1/6] libata: use sleep instead of standby command Phillip Susi
2013-12-16 23:30 ` [PATCH 2/6] libata: avoid waking disk for several commands Phillip Susi
2013-12-16 23:30 ` [PATCH 3/6] libata: resume in the background Phillip Susi
2014-01-10 22:26 ` Dan Williams
2014-01-11 2:25 ` Phillip Susi
2014-01-11 3:11 ` Dan Williams
2013-12-16 23:30 ` [PATCH 4/6] libata: don't start disks on resume Phillip Susi
2013-12-16 23:30 ` [PATCH 5/6] sd: don't start disks on system resume Phillip Susi
2013-12-17 6:43 ` James Bottomley
2013-12-17 15:01 ` Phillip Susi
2013-12-17 17:48 ` James Bottomley
2013-12-17 18:30 ` Phillip Susi
2013-12-16 23:30 ` [PATCH 6/6] libata: return power status in REQUEST SENSE command Phillip Susi
2013-12-17 18:02 ` Sergei Shtylyov
2013-12-17 18:35 ` Phillip Susi
2014-01-06 2:14 ` REQ_PM vs REQ_TYPE_PM_RESUME Phillip Susi
2014-01-06 7:36 ` Sujit Reddy Thumma
2014-01-06 9:15 ` Aaron Lu
2014-01-06 14:40 ` Phillip Susi
2014-01-06 15:38 ` Alan Stern
2014-01-07 2:44 ` Phillip Susi
2014-01-07 15:20 ` Alan Stern
2014-01-07 15:40 ` Phillip Susi
2014-01-07 15:56 ` Alan Stern
2014-01-09 18:29 ` Douglas Gilbert
2014-01-09 19:20 ` Phillip Susi
2014-01-10 5:23 ` Douglas Gilbert
2014-01-10 14:29 ` Phillip Susi
2014-01-07 7:49 ` 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:20 ` 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
2013-11-09 21:03 ` [PATCH 1/6] libata: use sleep instead of standby command Phillip Susi
2013-11-09 21:03 ` [PATCH 2/6] libata: avoid waking disk to check power Phillip Susi
2013-11-11 13:05 ` Sergei Shtylyov
2013-11-09 21:03 ` [PATCH 3/6] sd: don't bother spinning up disks on resume Phillip Susi
2013-11-11 13:08 ` Sergei Shtylyov
2013-11-11 14:28 ` Phillip Susi
2013-11-09 21:03 ` [PATCH 4/6] libata: resume in the background Phillip Susi
2013-11-11 13:10 ` Sergei Shtylyov
2013-11-09 21:03 ` [PATCH 5/6] libata: don't start disks on resume Phillip Susi
2013-11-09 21:03 ` [PATCH 6/6] libata: fake some more commands when drive is sleeping Phillip Susi
2013-11-11 16:59 ` [PATCH/RESEND v2 0/2] SATA disk resume time optimization Todd E Brandt
2013-11-11 17:08 ` Phillip Susi
2013-12-17 12:15 ` Tejun Heo
2013-12-17 14:24 ` Phillip Susi
2013-11-27 16:18 ` Phillip Susi
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=20131109012023.GA8978@linux.intel.com \
--to=todd.e.brandt@linux.intel.com \
--cc=JBottomley@parallels.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=psusi@ubuntu.com \
--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;
as well as URLs for NNTP newsgroup(s).