Skip to content

nvme power saving

Andy Lutomirski linux-nvme lkml 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest3 patches 15 repliesIn review
  2. v33 patches 12 repliesSuperseded
  3. v23 patches 3 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v13 patches11 repliesSuperseded

Changes in v4 from the cover letter

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

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3nvme/scsi: Remove power management supportdrivers/nvme/host/scsi.c+3 -711 reply
2/3nvme: Pass pointers, not dma addresses, to nvme_get/set_features()drivers/nvme/host/core.c drivers/nvme/host/nvme.h drivers/nvme/host/scsi.c+11 -130 replies
3/3nvme: Enable autonomous power state transitionsdrivers/nvme/host/core.c drivers/nvme/host/nvme.h include/linux/nvme.h+178 -00 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchJay FreyenseeChristoph Hellwig
SeriesT-b R-b
1/3A-b
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/3] nvme power saving

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(-)
Signature · 1 line
2.7.4