nvme: add support for streams and directives write-stream.3
authorJens Axboe <axboe@kernel.dk>
Wed, 14 Jun 2017 18:51:22 +0000 (12:51 -0600)
committerJens Axboe <axboe@fb.com>
Wed, 14 Jun 2017 18:56:55 +0000 (12:56 -0600)
commita47a60092592d33d44b669be574d26feb26d8ab7
treee6b988179e59e955aa6ccc157420cf86fdb893c3
parent8f057a02623ce366c2b21bfdff92e8236f410546
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 per name space, but it is
configurable with the 'streams_per_ns' module option. If a write stream
is set in a write, flag is as such before sending it to the device.

Some debug stuff in this patch, dumping streams ID params when
we load nvme.

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