diff options
author | smh <smh@FreeBSD.org> | 2015-12-11 02:06:03 +0000 |
---|---|---|
committer | smh <smh@FreeBSD.org> | 2015-12-11 02:06:03 +0000 |
commit | 0026debd97a47e3b952758c1d81371421ab2c7bf (patch) | |
tree | b548318abda7d9be5d710d5b0d1939fd5d567cf2 /sys/dev/nvd | |
parent | d153dbf650bab72803c26528301ccdbda7ed4b0d (diff) | |
download | FreeBSD-src-0026debd97a47e3b952758c1d81371421ab2c7bf.zip FreeBSD-src-0026debd97a47e3b952758c1d81371421ab2c7bf.tar.gz |
Limit stripesize reported from nvd(4) to 4K
Intel NVMe controllers have a slow path for I/Os that span a 128KB stripe boundary but ZFS limits ashift, which is derived from d_stripesize, to 13 (8KB) so we limit the stripesize reported to geom(8) to 4KB.
This may result in a small number of additional I/Os to require splitting in nvme(4), however the NVMe I/O path is very efficient so these additional I/Os will cause very minimal (if any) difference in performance or CPU utilisation.
This can be controller by the new sysctl kern.nvme.max_optimal_sectorsize.
MFC after: 1 week
Sponsored by: Multiplay
Differential Revision: https://reviews.freebsd.org/D4446
Diffstat (limited to 'sys/dev/nvd')
-rw-r--r-- | sys/dev/nvd/nvd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/nvd/nvd.c b/sys/dev/nvd/nvd.c index 5d75876..f459e06 100644 --- a/sys/dev/nvd/nvd.c +++ b/sys/dev/nvd/nvd.c @@ -279,7 +279,7 @@ nvd_new_disk(struct nvme_namespace *ns, void *ctrlr_arg) disk->d_sectorsize = nvme_ns_get_sector_size(ns); disk->d_mediasize = (off_t)nvme_ns_get_size(ns); disk->d_delmaxsize = (off_t)nvme_ns_get_size(ns); - disk->d_stripesize = nvme_ns_get_stripesize(ns); + disk->d_stripesize = nvme_ns_get_optimal_sector_size(ns); if (TAILQ_EMPTY(&disk_head)) disk->d_unit = 0; |