svn commit: r348351 - head/lib/libmemstat
Gleb Smirnoff
glebius at FreeBSD.org
Wed May 29 03:14:47 UTC 2019
Author: glebius
Date: Wed May 29 03:14:46 2019
New Revision: 348351
URL: https://svnweb.freebsd.org/changeset/base/348351
Log:
The KVM code also needs a fix similar to r344269.
Reported by: pho
Modified:
head/lib/libmemstat/memstat_uma.c
Modified: head/lib/libmemstat/memstat_uma.c
==============================================================================
--- head/lib/libmemstat/memstat_uma.c Wed May 29 02:26:15 2019 (r348350)
+++ head/lib/libmemstat/memstat_uma.c Wed May 29 03:14:46 2019 (r348351)
@@ -423,6 +423,11 @@ memstat_kvm_uma(struct memory_type_list *list, void *k
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++) {
More information about the svn-src-head
mailing list