NVMe Power-Savings Support Is Coming For Linux
Written by Michael Larabel in Linux Kernel on 29 August 2016 at 09:23 AM EDT. 3 Comments
The Linux kernel to now hasn't provided proper support for NVMe power-savings via APST, Autonomous Power State Transitions, but it's coming.

Linux kernel developer Andy Lutomirski has posted a set of patches for implementing power-savings support for NVM Express storage devices. He commented on the patch series that touches around 200 lines of code, "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."

There was some NVMe SCSI power management code previously, but according to Lutomirski basically came down to a broken mess. He wrote, "As far as I can tell, there is basically nothing correct about this code. It misinterprets npss (off-by-one). It hardcodes a bunch of power states, which is nonsense, because they're all just indices into a table that software needs to parse. It completely ignores the distinction between operational and non-operational states. And, until 4.8, if all of the above magically succeeded, it would dereference a NULL pointer and OOPS."

The Autonomous Power State Transitions is part of the NVMe specification and allows for a device to support multiple power states. APST supports states where there is reduced power equating to slower performance or where the device is temporarily sleeping in a non-operational state and then woken up on activity. While APST is part of the NVMe spec, not all NVMe devices support the feature.

NVMe SSD storage doesn't consume much power as it is, but every little bit counts especially for a mobile device. With the common Samsung 950 NVMe SSD, its UBX controller supports APST and advertises operational states of 6W or 8W, meaning about a 2 Watt saving should be possible with these patches.

Hopefully this NVMe APST code will be ready in time for Linux 4.9.
Related News
About The Author
Author picture

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter or contacted via MichaelLarabel.com.

Popular News This Week