On Fri, 14 Sep 2018, Christoph Hellwig wrote: > > 11 files changed, 266 insertions(+), 239 deletions(-) > > create mode 100644 block/blk-pm.c > > create mode 100644 block/blk-pm.h > > create mode 100644 include/linux/blk-pm.h > > > > diff --git a/block/Kconfig b/block/Kconfig > > index 1f2469a0123c..e213d90a5e64 100644 > > --- a/block/Kconfig > > +++ b/block/Kconfig > > @@ -228,4 +228,9 @@ config BLK_MQ_RDMA > > depends on BLOCK && INFINIBAND > > default y > > > > +config BLK_PM > > + bool > > + depends on BLOCK && PM > > + default y > > This could be shortened to > > config BLK_PM > def_bool BLOCK && PM > > Also a lot of this code is only used by scsi. I really wonder if > we should move it into scsi instead, and if not at least make it > a selectable option that only scsi selects. Although SCSI is currently the only user of block-layer runtime PM, there's no reason other subsystems or drivers couldn't decide to use it too. In theory, anything whose activity is controlled by block requests could benefit from it. Making it selectable sounds like a reasonable approach. Alan Stern