All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/3] nvme power saving
@ 2016-09-16 18:16 ` Andy Lutomirski
  0 siblings, 0 replies; 38+ messages in thread
From: Andy Lutomirski @ 2016-09-16 18:16 UTC (permalink / raw)
  To: Keith Busch, Jens Axboe
  Cc: linux-nvme, Christoph Hellwig, linux-kernel, J Freyensee,
	Andy Lutomirski

Hi all-

Here's v4 of the APST patch set.  The biggest bikesheddable thing (I
think) is the scaling factor.  I currently have it hardcoded so that
we wait 50x the total latency before entering a power saving state.
On my Samsung 950, this means we enter state 3 (70mW, 0.5ms entry
latency, 5ms exit latency) after 275ms and state 4 (5mW, 2ms entry
latency, 22ms exit latency) after 1200ms.  I have the default max
latency set to 25ms.

FWIW, in practice, the latency this introduces seems to be well
under 22ms, but my benchmark is a bit silly and I might have
measured it wrong.  I certainly haven't observed a slowdown just
using my laptop.

This time around, I changed the names of parameters after Jay
Frayensee got confused by the first try.  Now they are:

 - ps_max_latency_us in sysfs: actually controls it.
 - nvme_core.default_ps_max_latency_us: sets the default.

Yeah, they're mouthfuls, but they should be clearer now.

Changes from v3:
 - Remove const from nvme_set_feature()'s parameter.  My inner C++
   programmer cringes a little...

Changes from v2:
 - Rename the parameters.

Changes from v1:
 - Get rid of feature buffer alignment warnings.
 - Change the error message if NPSS is bogus.
 - Rename apst_max_latency_ns to apst_max_latency_us because module params
   don't like u64 or unsigned long long and I wanted to make it fit more
   comfortably in a ulong module param.  (And the nanoseconds were useless.)
 - Add a module parameter for the default max latency.

Andy Lutomirski (3):
  nvme/scsi: Remove power management support
  nvme: Pass pointers, not dma addresses, to nvme_get/set_features()
  nvme: Enable autonomous power state transitions

 drivers/nvme/host/core.c | 180 ++++++++++++++++++++++++++++++++++++++++++++---
 drivers/nvme/host/nvme.h |  10 ++-
 drivers/nvme/host/scsi.c |  80 ++-------------------
 include/linux/nvme.h     |   6 ++
 4 files changed, 192 insertions(+), 84 deletions(-)

-- 
2.7.4

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

end of thread, other threads:[~2016-10-28  5:29 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-16 18:16 [PATCH v4 0/3] nvme power saving Andy Lutomirski
2016-09-16 18:16 ` Andy Lutomirski
2016-09-16 18:16 ` [PATCH v4 1/3] nvme/scsi: Remove power management support Andy Lutomirski
2016-09-16 18:16   ` Andy Lutomirski
2016-09-16 23:37   ` J Freyensee
2016-09-16 23:37     ` J Freyensee
2016-09-16 18:16 ` [PATCH v4 2/3] nvme: Pass pointers, not dma addresses, to nvme_get/set_features() Andy Lutomirski
2016-09-16 18:16   ` Andy Lutomirski
2016-09-16 18:16 ` [PATCH v4 3/3] nvme: Enable autonomous power state transitions Andy Lutomirski
2016-09-16 18:16   ` Andy Lutomirski
2016-09-17  0:49 ` [PATCH v4 0/3] nvme power saving J Freyensee
2016-09-17  0:49   ` J Freyensee
2016-09-22  0:11 ` Andy Lutomirski
2016-09-22  0:11   ` Andy Lutomirski
2016-09-22 13:21   ` Christoph Hellwig
2016-09-22 13:21     ` Christoph Hellwig
2016-09-22 14:23 ` Jens Axboe
2016-09-22 14:23   ` Jens Axboe
2016-09-22 20:11   ` Andy Lutomirski
2016-09-22 20:11     ` Andy Lutomirski
2016-09-22 20:43     ` Jens Axboe
2016-09-22 20:43       ` Jens Axboe
2016-09-22 21:33       ` J Freyensee
2016-09-22 21:33         ` J Freyensee
2016-09-22 22:15         ` Andy Lutomirski
2016-09-22 22:15           ` Andy Lutomirski
2016-10-28  0:06           ` Andy Lutomirski
2016-10-28  0:06             ` Andy Lutomirski
2016-10-28  5:29             ` Christoph Hellwig
2016-10-28  5:29               ` Christoph Hellwig
2016-09-22 22:16         ` Keith Busch
2016-09-22 22:16           ` Keith Busch
2016-09-22 22:07           ` Jens Axboe
2016-09-22 22:07             ` Jens Axboe
2016-09-23 23:42 ` Christoph Hellwig
2016-09-23 23:42   ` Christoph Hellwig
2016-09-24 16:55   ` Jens Axboe
2016-09-24 16:55     ` Jens Axboe

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.