public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/9] blk-mq: Implement runtime power management
@ 2018-08-07 22:51 Bart Van Assche
  2018-08-07 22:51 ` [PATCH v5 1/9] block: Change the preempt-only flag into a counter Bart Van Assche
                   ` (8 more replies)
  0 siblings, 9 replies; 21+ messages in thread
From: Bart Van Assche @ 2018-08-07 22:51 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-block, Christoph Hellwig, Bart Van Assche

Hello Jens,

This patch series not only implements runtime power management for blk-mq but
also fixes a starvation issue in the power management code for the legacy
block layer. Please consider this patch series for kernel v4.19.

Thanks,

Bart.

Changes compared to v4:
- Dropped the patches "Give RQF_PREEMPT back its original meaning" and
  "Serialize queue freezing and blk_pre_runtime_suspend()".
- Replaced "percpu_ref_read()" with "percpu_is_in_use()".
- Inserted pm_request_resume() calls in the block layer request allocation
  code such that the context that submits a request no longer has to call
  pm_runtime_get().

Changes compared to v3:
- Avoid adverse interactions between system-wide suspend/resume and runtime
  power management by changing the PREEMPT_ONLY flag into a counter.
- Give RQF_PREEMPT back its original meaning, namely that it is only set for
  ide_preempt requests.
- Remove the flag BLK_MQ_REQ_PREEMPT.
- Removed the pm_request_resume() call.

Changes compared to v2:
- Fixed the build for CONFIG_BLOCK=n.
- Added a patch that introduces percpu_ref_read() in the percpu-counter code.
- Added a patch that makes it easier to detect missing pm_runtime_get*() calls.
- Addressed Jianchao's feedback including the comment about runtime overhead
  of switching a per-cpu counter to atomic mode.

Changes compared to v1:
- Moved the runtime power management code into a separate file.
- Addressed Ming's feedback.

Bart Van Assche (9):
  block: Change the preempt-only flag into a counter
  block: Move power management code into a new source file
  block, scsi: Introduce blk_pm_runtime_exit()
  percpu-refcount: Introduce percpu_ref_is_in_use()
  block: Change the runtime power management approach (1/2)
  block: Change the runtime power management approach (2/2)
  block: Remove blk_pm_requeue_request()
  blk-mq: Insert a blk_pm_put_request() call
  blk-mq: Enable support for runtime power management

 block/Kconfig                   |   5 +
 block/Makefile                  |   1 +
 block/blk-core.c                | 277 ++++----------------------------
 block/blk-mq-debugfs.c          |  11 +-
 block/blk-mq.c                  |   8 +
 block/blk-pm.c                  | 230 ++++++++++++++++++++++++++
 block/blk-pm.h                  |  33 ++++
 block/elevator.c                |  26 +--
 drivers/scsi/scsi_lib.c         |  17 +-
 drivers/scsi/scsi_pm.c          |   1 +
 drivers/scsi/sd.c               |  10 +-
 drivers/scsi/sr.c               |   4 +-
 include/linux/blk-mq.h          |   2 +
 include/linux/blk-pm.h          |  26 +++
 include/linux/blkdev.h          |  38 ++---
 include/linux/percpu-refcount.h |   2 +
 lib/percpu-refcount.c           |  40 +++++
 17 files changed, 420 insertions(+), 311 deletions(-)
 create mode 100644 block/blk-pm.c
 create mode 100644 block/blk-pm.h
 create mode 100644 include/linux/blk-pm.h

-- 
2.18.0

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

end of thread, other threads:[~2018-08-09 17:12 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-07 22:51 [PATCH v5 0/9] blk-mq: Implement runtime power management Bart Van Assche
2018-08-07 22:51 ` [PATCH v5 1/9] block: Change the preempt-only flag into a counter Bart Van Assche
2018-08-08  8:21   ` Ming Lei
2018-08-08 15:27     ` Bart Van Assche
2018-08-07 22:51 ` [PATCH v5 2/9] block: Move power management code into a new source file Bart Van Assche
2018-08-07 22:51 ` [PATCH v5 3/9] block, scsi: Introduce blk_pm_runtime_exit() Bart Van Assche
2018-08-07 22:51 ` [PATCH v5 4/9] percpu-refcount: Introduce percpu_ref_is_in_use() Bart Van Assche
2018-08-08 15:23   ` Tejun Heo
2018-08-09 14:32     ` Bart Van Assche
2018-08-07 22:51 ` [PATCH v5 5/9] block: Change the runtime power management approach (1/2) Bart Van Assche
2018-08-08  6:11   ` jianchao.wang
2018-08-08  6:43     ` jianchao.wang
2018-08-08 17:28       ` Bart Van Assche
2018-08-09  2:52         ` Ming Lei
2018-08-09 17:12           ` Bart Van Assche
2018-08-07 22:51 ` [PATCH v5 6/9] block: Change the runtime power management approach (2/2) Bart Van Assche
2018-08-08  8:50   ` Ming Lei
2018-08-08 17:32     ` Bart Van Assche
2018-08-07 22:51 ` [PATCH v5 7/9] block: Remove blk_pm_requeue_request() Bart Van Assche
2018-08-07 22:51 ` [PATCH v5 8/9] blk-mq: Insert a blk_pm_put_request() call Bart Van Assche
2018-08-07 22:51 ` [PATCH v5 9/9] blk-mq: Enable support for runtime power management Bart Van Assche

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox