All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/4] block layer runtime pm
@ 2012-07-06  4:04 Lin Ming
  2012-07-06  4:04 ` [PATCH v5 1/4] block: add a flag to identify PM request Lin Ming
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Lin Ming @ 2012-07-06  4:04 UTC (permalink / raw)
  To: Jens Axboe, Alan Stern, Rafael J. Wysocki, Shaohua Li
  Cc: linux-kernel, linux-pm, linux-scsi

In August 2010, Jens and Alan discussed about "Runtime PM and the block
layer". http://marc.info/?t=128259108400001&r=1&w=2

Here are the v5 patches to implement the ideas discussed.
Welcome to give it a try.

git pull git://git.kernel.org/pub/scm/linux/kernel/git/mlin/linux.git block_pm

The test steps, for example

# ls -l /sys/block/sda
/sys/devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda

# echo auto > /sys/devices/pci0000:00/0000:00:1f.2/ata1/power/control
# echo auto > /sys/devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/power/control
# echo 10000 > /sys/devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/power/autosuspend_delay_ms

Then you'll see sda is suspended after 10secs idle.

# cat /sys/devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/power/runtime_status
suspended

And if you do some IO, it will resume immediately.

v5:
- rename scsi_execute_req to scsi_execute_req_flags
  and wrap scsi_execute_req around it.
- add detail function descriptions in patch 2 log
- define static helper functions to do runtime pm work on block layer
  and put the definitions inside a #ifdef block

v4:
- add CONFIG_PM_RUNTIME check
- update queue runtime pm status after system resume
- use pm_runtime_autosuspend instead of pm_request_autosuspend in scsi_runtime_idle
- always count PM request

v3:
- remove block layer suspend/resume callbacks
- add block layer runtime pm helper functions

v2:
- remove queue idle timer, use runtime pm core's auto suspend

Lin Ming (4):
      block: add a flag to identify PM request
      block: add runtime pm helpers
      block: implement runtime pm strategy
      [SCSI] sd: change to auto suspend mode

 block/blk-core.c           |   69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 block/elevator.c           |    4 ++++
 drivers/scsi/scsi_lib.c    |    9 ++++-----
 drivers/scsi/scsi_pm.c     |   38 ++++++++++++++++++++++++++++++--------
 drivers/scsi/scsi_sysfs.c  |    2 ++
 drivers/scsi/sd.c          |   16 +++++-----------
 include/linux/blk_types.h  |    2 ++
 include/linux/blkdev.h     |   65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 include/scsi/scsi_device.h |   17 +++++++++++++----
 9 files changed, 194 insertions(+), 28 deletions(-)

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2013-01-14  7:18 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-06  4:04 [PATCH v5 0/4] block layer runtime pm Lin Ming
2012-07-06  4:04 ` [PATCH v5 1/4] block: add a flag to identify PM request Lin Ming
2012-07-06  4:04 ` [PATCH v5 2/4] block: add runtime pm helpers Lin Ming
2012-07-06  4:04 ` [PATCH v5 3/4] block: implement runtime pm strategy Lin Ming
2012-07-06  5:00   ` James Bottomley
2012-07-06  6:07     ` Lin Ming
2012-07-06  8:05       ` James Bottomley
2012-07-06 14:59         ` Alan Stern
2012-07-06 14:59           ` Alan Stern
2013-01-14  7:18         ` Aaron Lu
2012-07-06  7:27   ` Matthew Wilcox
2012-07-06 14:21   ` Alan Stern
2012-07-06 14:21     ` Alan Stern
2012-07-06 14:51     ` Lin Ming
2012-07-06  4:04 ` [PATCH v5 4/4] [SCSI] sd: change to auto suspend mode Lin Ming

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.