All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC 0/4] blk-mq: support runtime PM
@ 2018-07-11 16:29 Ming Lei
  2018-07-11 16:29 ` [PATCH RFC 1/4] blk-mq: introduce blk_mq_support_runtime_pm() Ming Lei
                   ` (3 more replies)
  0 siblings, 4 replies; 23+ messages in thread
From: Ming Lei @ 2018-07-11 16:29 UTC (permalink / raw)
  To: Jens Axboe
  Cc: linux-block, Ming Lei, Rafael J. Wysocki, Alan Stern, linux-pm,
	Greg Kroah-Hartman, Christoph Hellwig, Bart Van Assche,
	James E.J. Bottomley, Martin K. Petersen, linux-scsi

Hi Guys,

Runtime PM is usually enabled for SCSI devices, and we are switching to
SCSI_MQ recently, but runtime PM isn't supported yet by blk-mq, and
people may complain that.

This patch tries to support runtime PM for blk-mq. And one chanllenge is
that it can be quite expensive to account the active in-flight IOs for
figuring out when to mark the last busy. This patch simply marks busy
after each non-PM IO is done, and this way is workable because:

1) pm_runtime_mark_last_busy() is very cheap

2) in-flight non-PM IO is checked in blk_pre_runtime_suspend(), so
if there is any IO queued, the device will be prevented from being
suspened.

3) Generally speaking, autosuspend_delay_ms is often big, and should
be in unit of second, so it shouldn't be a big deal to check if queue
is idle in blk_pre_runtime_suspend().

Ming Lei (4):
  blk-mq: introduce blk_mq_support_runtime_pm()
  blk-mq: introduce blk_mq_pm_queue_idle()
  blk-mq: prepare for supporting runtime PM
  scsi_mq: enable runtime PM

 block/blk-core.c        | 14 +++++++++++---
 block/blk-mq.c          | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 block/blk-mq.h          |  3 +++
 drivers/scsi/scsi_lib.c |  3 ++-
 include/linux/blk-mq.h  | 10 ++++++++++
 5 files changed, 72 insertions(+), 4 deletions(-)

Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: linux-pm@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Bart Van Assche <bart.vanassche@wdc.com>
Cc: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org


-- 
2.9.5

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

end of thread, other threads:[~2018-07-13 22:47 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-11 16:29 [PATCH RFC 0/4] blk-mq: support runtime PM Ming Lei
2018-07-11 16:29 ` [PATCH RFC 1/4] blk-mq: introduce blk_mq_support_runtime_pm() Ming Lei
2018-07-11 17:10   ` Christoph Hellwig
2018-07-11 16:29 ` [PATCH RFC 2/4] blk-mq: introduce blk_mq_pm_queue_idle() Ming Lei
2018-07-11 17:11   ` Christoph Hellwig
2018-07-11 16:29 ` [PATCH RFC 3/4] blk-mq: prepare for supporting runtime PM Ming Lei
2018-07-11 17:19   ` Christoph Hellwig
2018-07-12  9:58   ` Ming Lei
2018-07-12 12:28     ` Ming Lei
2018-07-12 14:00       ` Jens Axboe
2018-07-12 21:32         ` Ming Lei
2018-07-12 21:44           ` Jens Axboe
2018-07-12 23:15             ` Ming Lei
2018-07-13 14:20               ` Jens Axboe
2018-07-13 20:27                 ` Alan Stern
2018-07-13 20:39                   ` Jens Axboe
2018-07-13 22:47                     ` Ming Lei
2018-07-11 16:29 ` [PATCH RFC 4/4] scsi_mq: enable " Ming Lei
2018-07-11 17:14   ` Christoph Hellwig
2018-07-12  1:36     ` Ming Lei
2018-07-12  7:17       ` Christoph Hellwig
2018-07-12 12:21         ` Ming Lei
2018-07-11 17:28   ` Alan Stern

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.