svn commit: r356482 - in head: share/man/man4 sys/dev/nvme

Alexander Motin mav at FreeBSD.org
Tue Jan 7 23:29:55 UTC 2020


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);


More information about the svn-src-all mailing list