freebsd-dev/sys/dev/nvme
Alexander Motin e3bcd07d83 nvme(4): Report NPWA before NPWG as stripesize.
New Samsung 980 SSDs report Namespace Preferred Write Alignment of
8 (4KB) and Namespace Preferred Write Granularity of 32 (16KB).
My quick tests show that 16KB is a minimal sequential write size
when the SSD reaches peak IOPS, so writing much less is very slow.
But writing slightly less or slightly more does not change much,
so it seems not so much a size granularity as minimum I/O size.

Thinking about different stripesize consumers:
 - Partition alignment should be based on NPWA by definition.
 - ZFS ashift in part of forcing alignment of all I/Os should also
be based on NPWA.  In part of forcing size granularity, if really
needed, it may be set to NPWG, but too big value can make ZFS too
space-inefficient, and the 16KB is actually the biggest supported
value there now.
 - ZFS recordsize/volblocksize could potentially be tuned up toward
NPWG to work as I/O size granularity, but enabled compression makes
it too fuzzy.  And those are normally user-configurable things.
 - ZFS I/O aggregation code could definitely use Optimal Write Size
value and may be NPWG, but we don't have fields in GEOM now to report
the minimal and optimal I/O sizes, and even maximal is not reported
outside GEOM DISK to be used by ZFS.

MFC after:	1 week
2021-07-05 23:13:15 -04:00
..
nvme_ahci.c Make nvme(4) driver some more NUMA aware. 2019-09-23 17:53:47 +00:00
nvme_ctrlr_cmd.c Add Host Memory Buffer support to nvme(4). 2020-01-07 21:17:11 +00:00
nvme_ctrlr.c nvme: fix a race between failing the controller and failing requests 2021-05-28 23:05:40 -06:00
nvme_ns_cmd.c Add a brief comment explaining why we can return ETIMEDOUT from the call to the 2019-09-02 17:10:46 +00:00
nvme_ns.c nvme(4): Report NPWA before NPWG as stripesize. 2021-07-05 23:13:15 -04:00
nvme_pci.c nvme: clean up empty lines in .c and .h files 2020-09-01 22:03:10 +00:00
nvme_private.h nvme: Make nvme_ctrlr_hw_reset static 2021-02-08 13:29:24 -07:00
nvme_qpair.c nvme: coherently read status of completion records 2021-07-02 16:05:19 -06:00
nvme_sim.c Report cpi->hba_* for nda(4) because why not. 2020-08-12 20:05:43 +00:00
nvme_sysctl.c nvme: Remove compat code for older kernels 2020-10-24 01:59:01 +00:00
nvme_test.c nvme: clean up empty lines in .c and .h files 2020-09-01 22:03:10 +00:00
nvme_util.c nvme: clean up empty lines in .c and .h files 2020-09-01 22:03:10 +00:00
nvme.c nvme: use config_intrhook_drain to avoid removable card races 2021-03-11 09:45:10 -07:00
nvme.h nvme: Fix alignment on nvme structures 2021-07-02 16:05:19 -06:00