From owner-svn-src-all@freebsd.org Mon Jul 27 15:32:38 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 967FE9ACC09; Mon, 27 Jul 2015 15:32:38 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 865378FD; Mon, 27 Jul 2015 15:32:38 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6RFWcwT024346; Mon, 27 Jul 2015 15:32:38 GMT (envelope-from jimharris@FreeBSD.org) Received: (from jimharris@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6RFWc5C024345; Mon, 27 Jul 2015 15:32:38 GMT (envelope-from jimharris@FreeBSD.org) Message-Id: <201507271532.t6RFWc5C024345@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jimharris set sender to jimharris@FreeBSD.org using -f From: Jim Harris Date: Mon, 27 Jul 2015 15:32:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r285915 - stable/10/sys/dev/nvd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Jul 2015 15:32:38 -0000 Author: jimharris Date: Mon Jul 27 15:32:37 2015 New Revision: 285915 URL: https://svnweb.freebsd.org/changeset/base/285915 Log: 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. Sponsored by: Intel Modified: stable/10/sys/dev/nvd/nvd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/nvd/nvd.c ============================================================================== --- stable/10/sys/dev/nvd/nvd.c Mon Jul 27 15:26:50 2015 (r285914) +++ stable/10/sys/dev/nvd/nvd.c Mon Jul 27 15:32:37 2015 (r285915) @@ -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;