The KVM code also needs a fix similar to r344269.

Reported by:	pho
This commit is contained in:
Gleb Smirnoff 2019-05-29 03:14:46 +00:00
parent 78473c580b
commit bec2d7e9a2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=348351

View File

@ -423,6 +423,11 @@ memstat_kvm_uma(struct memory_type_list *list, void *kvm_handle)
mtp->mt_failures = kvm_counter_u64_fetch(kvm,
(unsigned long )uz.uz_fails);
mtp->mt_sleeps = uz.uz_sleeps;
/* See comment above in memstat_sysctl_uma(). */
if (mtp->mt_numallocs < mtp->mt_numfrees)
mtp->mt_numallocs = mtp->mt_numfrees;
if (kz.uk_flags & UMA_ZFLAG_INTERNAL)
goto skip_percpu;
for (i = 0; i < mp_maxid + 1; i++) {