Minor adjustments to r356474 and r356480.

Reported by:	jkim, imp
MFC after:	2 weeks
X-MFC-with:	r356474
This commit is contained in:
Alexander Motin 2020-01-07 23:29:54 +00:00
parent f39b4f8899
commit 6de4e458fa
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

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