Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Jan 2020 23:29:54 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r356482 - in head: share/man/man4 sys/dev/nvme
Message-ID:  <202001072329.007NTslE022986@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Tue Jan  7 23:29:54 2020
New Revision: 356482
URL: https://svnweb.freebsd.org/changeset/base/356482

Log:
  Minor adjustments to r356474 and r356480.
  
  Reported by:	jkim, imp
  MFC after:	2 weeks
  X-MFC-with:	r356474

Modified:
  head/share/man/man4/nvme.4
  head/sys/dev/nvme/nvme_ctrlr.c

Modified: head/share/man/man4/nvme.4
==============================================================================
--- head/share/man/man4/nvme.4	Tue Jan  7 23:18:31 2020	(r356481)
+++ head/share/man/man4/nvme.4	Tue Jan  7 23:29:54 2020	(r356482)
@@ -126,7 +126,7 @@ Buffer for capable devices, set the following tunable:
 hw.nvme.hmb_max
 .Ed
 .Pp
-The default value is 1% of physical memory size per device.
+The default value is 5% of physical memory size per device.
 .Pp
 The
 .Xr nvd 4

Modified: head/sys/dev/nvme/nvme_ctrlr.c
==============================================================================
--- head/sys/dev/nvme/nvme_ctrlr.c	Tue Jan  7 23:18:31 2020	(r356481)
+++ head/sys/dev/nvme/nvme_ctrlr.c	Tue Jan  7 23:29:54 2020	(r356482)
@@ -886,7 +886,7 @@ nvme_ctrlr_hmb_alloc(struct nvme_controller *ctrlr)
 	TUNABLE_UINT64_FETCH("hw.nvme.hmb_max", &max);
 
 	min = (long long unsigned)ctrlr->cdata.hmmin * 4096;
-	if (max < min)
+	if (max == 0 || max < min)
 		return;
 	pref = MIN((long long unsigned)ctrlr->cdata.hmpre * 4096, max);
 	minc = MAX(ctrlr->cdata.hmminds * 4096, PAGE_SIZE);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202001072329.007NTslE022986>