Page MenuHomeFreeBSD

D4446.1775693305.diff
No OneTemporary

Size
980 B
Referenced Files
None
Subscribers
None

D4446.1775693305.diff

Index: sys/dev/nvd/nvd.c
===================================================================
--- sys/dev/nvd/nvd.c
+++ sys/dev/nvd/nvd.c
@@ -279,7 +279,18 @@
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);
+ /*
+ * 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.
+ */
+ disk->d_stripesize = MIN(nvme_ns_get_stripesize(ns), 1<<12);
if (TAILQ_EMPTY(&disk_head))
disk->d_unit = 0;

File Metadata

Mime Type
text/plain
Expires
Thu, Apr 9, 12:08 AM (8 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28305132
Default Alt Text
D4446.1775693305.diff (980 B)

Event Timeline