[PATCH 0/2] [SRU Y/Z/A] Enable APST for more NVMe
Kai-Heng Feng
kai.heng.feng at canonical.com
Wed Jun 28 09:37:12 UTC 2017
BugLink: https://bugs.launchpad.net/bugs/1694675
[Impact]
NVMe consumes lots of power. It may not be an issue on power cord plugged
devices, but it will reduce usage time on battery powered devices.
APST is enabled but it can't find power saving state to transits to:
$ sudo nvme get-feature -f 0x0c -H /dev/nvme0
get-feature:0xc (Autonomous Power State Transition), Current value:0x000001
Autonomous Power State Transition Enable (APSTE): Enabled
Auto PST Entries .................
Entry[ 0]
.................
Idle Time Prior to Transition (ITPT): 0 ms
Idle Transition Power State (ITPS): 0
.................
Entry[ 1]
.................
Idle Time Prior to Transition (ITPT): 0 ms
Idle Transition Power State (ITPS): 0
...
[Fix]
The original logic is to skip power states that enlat + exlat larger than
certain latency limit, which is 25000 originally.
These first patch change the logic only to consider exlat - because that's the
most cases that actually happen.
The second patch relax the lantency limit - hence more power saving states can
be choosen to transit to.
[Test Case]
APST is enabled, also there's power saving state (3) to transit to:
$ sudo nvme get-feature -f 0x0c -H /dev/nvme0
get-feature:0xc (Autonomous Power State Transition), Current value:0x000001
Autonomous Power State Transition Enable (APSTE): Enabled
Auto PST Entries .................
Entry[ 0]
.................
Idle Time Prior to Transition (ITPT): 500 ms
Idle Transition Power State (ITPS): 3
.................
Entry[ 1]
.................
Idle Time Prior to Transition (ITPT): 500 ms
Idle Transition Power State (ITPS): 3
...
[Regression Potential]
Low. It can be disabled by kernel parameter.
We already enabled APST on X/Y for a while, this SRU will include more NVMes
to enable APST. If any regression happens, user can disable APST in kernel
parameter. I'll also add new quirk for those devices to upstream kernel.
There's an incident that user can't disable APST via kernel parameter
(LP: #1699004), it's being solved in upstream kernel and I'll backport the
patch in another SRU.
Either way, NVMe APST is enabled by default from 4.11 onward - if faulty NVMes
need to be quirked, it's better be sooner rather than later.
Kai-Heng Feng (2):
nvme: only consider exit latency when choosing useful non-op power
states
nvme: relax APST default max latency to 100ms
drivers/nvme/host/core.c | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
--
2.13.2
More information about the kernel-team
mailing list