Skip to content

Accelerate Storage Resume (2x or more)

Dan Williams linux-ide linux-scsi 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest3 patches 3 repliesIn review
  2. v53 patches 24 repliesSuperseded

Changes in v6 from the cover letter

* Per Tejun, fixed up the naming of the ata_port helper routines
* Cleaned up the return value of ata_port_pm helper routines to be 'void'
* Per Tejun, added a check of whether async scanning is disabled to gate whether async resume will be performed out of caution for systems that do not handle staggered spin-up outside of the kernel. Clarified this in the changelog and added commentary in the code.

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3libata, libsas: kill pm_result and related cleanupdrivers/ata/libata-core.c drivers/ata/libata-eh.c drivers/scsi/libsas/sas_ata.c +2 more+71 -1243 replies
2/3libata: async resumedrivers/ata/libata-core.c+1 -10 replies
3/3scsi: async sd resumedrivers/scsi/Kconfig drivers/scsi/scsi.c drivers/scsi/scsi_pm.c +3 more+109 -300 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchAlan Stern
1/3
2/3
3/3A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v6 thread

Cover letter [PATCH v6 0/3] Accelerate Storage Resume (2x or more)

Changes since v5:
* Per Tejun, fixed up the naming of the ata_port helper routines
* Cleaned up the return value of ata_port_pm helper routines to be 'void'
* Per Tejun, added a check of whether async scanning is disabled to gate whether async resume will be performed out of caution for systems that do not handle staggered spin-up outside of the kernel. Clarified this in the changelog and added commentary in the code.

===

It is not everyday that a kernel operation gets > 2x faster! Great find by Todd and his AnalyzeSuspend tool [1].

Todd is on vacation so I am taking care of these patches to make sure they get in the queue for 3.15.

The significant changes from Todd's last submission [2]:

1/ Split out the pure cleanup into its own patch, and expand it to clean
up libsas as well

2/ Move the entirety of scsi_device resume to an async context. As
written, v4 of the patchset overlapped the scsi-start-stop command with the scsi_device_resume(). Now in v5 the queue restart is properly ordered with the completion of the scsi-start-stop command.

Resume completion time as reported by:

"echo devices > /sys/power/pm_test && echo mem > /sys/power/state"

BEFORE: PM: resume of devices complete after 2271.097 msecs
AFTER:  PM: resume of devices complete after 1057.404 msecs

On a system with two SSDs attached via AHCI.

[1]: Todd's testing showing up to 12x resume latency improvement in some cases:
https://01.org/suspendresume/blogs/tebrandt/2013/hard-disk-resume-optimization-simpler-approach

[2]: Todd's v4 patchset:
[PATCH v4 0/2] http://marc.info/?l=linux-ide&m=138984698103487&w=2
[PATCH v4 1/2] http://marc.info/?l=linux-ide&m=138984713203515&w=2
[PATCH v4 2/2] http://marc.info/?l=linux-ide&m=138984722003539&w=2

---

Dan Williams (2):
libata, libsas: kill pm_result and related cleanup
scsi: async sd resume

Todd Brandt (1):
libata: async resume

 drivers/ata/libata-core.c     |  135 ++++++++++++++++++-----------------------
 drivers/ata/libata-eh.c       |   13 +---
 drivers/scsi/Kconfig          |    3 +
 drivers/scsi/libsas/sas_ata.c |   35 ++---------
 drivers/scsi/scsi.c           |    3 +
 drivers/scsi/scsi_pm.c        |  128 ++++++++++++++++++++++++++++++---------
 drivers/scsi/scsi_priv.h      |    2 +
 drivers/scsi/scsi_scan.c      |    2 -
 drivers/scsi/sd.c             |    1 
 include/linux/libata.h        |   11 +--
 include/scsi/libsas.h         |    1 
 11 files changed, 180 insertions(+), 154 deletions(-)