WSL2-Linux-Kernel/drivers/nvme/host
Bart Van Assche 81adb86334 nvme: set physical block size and optimal I/O size
>From the NVMe 1.4 spec:

NSFEAT bit 4 if set to 1: indicates that the fields NPWG, NPWA, NPDG, NPDA,
and NOWS are defined for this namespace and should be used by the host for
I/O optimization;
[ ... ]
Namespace Preferred Write Granularity (NPWG): This field indicates the
smallest recommended write granularity in logical blocks for this namespace.
This is a 0's based value. The size indicated should be less than or equal
to Maximum Data Transfer Size (MDTS) that is specified in units of minimum
memory page size. The value of this field may change if the namespace is
reformatted. The size should be a multiple of Namespace Preferred Write
Alignment (NPWA). Refer to section 8.25 for how this field is utilized to
improve performance and endurance.
[ ... ]
Each Write, Write Uncorrectable, or Write Zeroes commands should address a
multiple of Namespace Preferred Write Granularity (NPWG) (refer to Figure
245) and Stream Write Size (SWS) (refer to Figure 515) logical blocks (as
expressed in the NLB field), and the SLBA field of the command should be
aligned to Namespace Preferred Write Alignment (NPWA) (refer to Figure 245)
for best performance.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2019-07-09 14:15:37 -07:00
..
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile nvme-tcp: add NVMe over TCP host driver 2018-12-13 09:58:58 +01:00
core.c nvme: set physical block size and optimal I/O size 2019-07-09 14:15:37 -07:00
fabrics.c nvme: introduce nvme_is_fabrics to check fabrics cmd 2019-06-21 11:08:38 +02:00
fabrics.h nvme-fabrics: convert to SPDX identifiers 2019-02-20 07:22:13 -07:00
fault_inject.c nvme: enable to inject errors into admin commands 2019-06-21 11:15:50 +02:00
fc.c nvme-fc: add message when creating new association 2019-06-21 11:08:38 +02:00
lightnvm.c block: remove blk_init_request_from_bio 2019-06-20 10:29:22 -06:00
multipath.c nvme-multipath: avoid crash on invalid subsystem cntlid enumeration 2019-05-13 16:00:03 +02:00
nvme.h nvme: set physical block size and optimal I/O size 2019-07-09 14:15:37 -07:00
pci.c nvme-pci: limit max_hw_sectors based on the DMA max mapping size 2019-07-09 13:44:44 -07:00
rdma.c nvme-rdma: use dynamic dma mapping per command 2019-06-06 09:53:19 -07:00
tcp.c nvme-tcp: fix queue mapping when queue count is limited 2019-05-30 11:07:37 -07:00
trace.c nvme-trace: add delete completion and submission queue to admin cmds tracer 2019-07-09 14:15:37 -07:00
trace.h nvme-trace: print result and status in hex format 2019-06-21 11:12:37 +02:00