The KVM code also needs a fix similar to r344269.

Reported by:	pho
This commit is contained in:
glebius 2019-05-29 03:14:46 +00:00
parent 9f37d8c947
commit 3c1186c5c7

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++) {