nvme: add support for streams and directives write-stream.7
authorJens Axboe <axboe@kernel.dk>
Fri, 16 Jun 2017 19:57:20 +0000 (13:57 -0600)
committerJens Axboe <axboe@fb.com>
Sat, 17 Jun 2017 19:57:10 +0000 (13:57 -0600)
commite28e9e88f86c9b5c76c89cd9f1056b59decd1380
treeda5f06a05805e2c93f5ad06089e5f9fd76e6e894
parentfd2a595fc913b112dd1273855f41f37431ba11e9
nvme: add support for streams and directives

This adds support for Directives in NVMe, particular for the Streams
directive. Support for Directives is a new feature in NVMe 1.3. It
allows a user to pass in information about where to store the data, so
that it the device can do so most effiently. If an application is
managing and writing data with different life times, mixing differently
retentioned data onto the same locations on flash can cause write
amplification to grow. This, in turn, will reduce performance and life
time of the device.

We default to allocating 4 streams, controller wide, so we can use them
on all name spaces. This is configurable with the 'streams' module
parameter. If a write stream is set in a write, flag is as such before
sending it to the device.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/host/core.c
drivers/nvme/host/nvme.h
include/linux/nvme.h