Date: Mon, 27 Jul 2015 17:50:06 +0000 (UTC) From: Jim Harris <jimharris@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r285919 - releng/10.2/sys/dev/nvd Message-ID: <201507271750.t6RHo6NC079310@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jimharris Date: Mon Jul 27 17:50:05 2015 New Revision: 285919 URL: https://svnweb.freebsd.org/changeset/base/285919 Log: MFS r285915: MFC r285767: nvd: set d_delmaxsize to full capacity of NVMe namespace The NVMe specification has no ability to specify a maximum delete size that is less than the full capacity of the namespace - so just using the namespace size is the correct value here. This fixes reported issues where ZFS trim on init looked like it was hanging the system - previously the default I/O max size (128KB on Intel NVMe controllers) was used for delete operations which worked out to only about 8MB/s. With this patch I can add an 800GB DC P3700 drive to a ZFS pool in about 15-20 seconds. Approved by: re (gjb) Sponsored by: Intel Modified: releng/10.2/sys/dev/nvd/nvd.c Directory Properties: releng/10.2/ (props changed) Modified: releng/10.2/sys/dev/nvd/nvd.c ============================================================================== --- releng/10.2/sys/dev/nvd/nvd.c Mon Jul 27 15:37:02 2015 (r285918) +++ releng/10.2/sys/dev/nvd/nvd.c Mon Jul 27 17:50:05 2015 (r285919) @@ -278,6 +278,7 @@ nvd_new_disk(struct nvme_namespace *ns, disk->d_maxsize = nvme_ns_get_max_io_xfer_size(ns); 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); if (TAILQ_EMPTY(&disk_head)) disk->d_unit = 0;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201507271750.t6RHo6NC079310>