diff options
author | Robert Watson <rwatson@FreeBSD.org> | 2005-07-20 09:17:40 +0000 |
---|---|---|
committer | Robert Watson <rwatson@FreeBSD.org> | 2005-07-20 09:17:40 +0000 |
commit | ca108fe268b738a363dde8e3cba5be3bbc2d9cc9 (patch) | |
tree | d3758da9b6587221ae0e6860dda2621e94ec4663 /lib/libmemstat/memstat.h | |
parent | 18b35df8fe3aac88b341734d5a7db059b15a6074 (diff) | |
download | src-ca108fe268b738a363dde8e3cba5be3bbc2d9cc9.tar.gz src-ca108fe268b738a363dde8e3cba5be3bbc2d9cc9.zip |
UMA supports "secondary" zones, in which a second zone can be layered
on top of a primary zone, sharing the same allocation "keg". When
reporting statistics for zones, do not report the free items in the
keg as part of the free items in the zone, or those free items will
be reported more than once: for the primary zone, and then any
secondary zones off the primary zone. Separately record and maintain
a kegfree statistic, and export via memstat_get_kegfree(), which is
available for use if needed. Since items free'd back to the keg are
not fully initialized, and hence may not actually be available (since
secondary zone ctor-time initialization can fail), this makes some
amount of sense.
This change corrects a bug made visible in the libmemstat(3)
modifications to netstat: mbufs freed back to the keg from the
packet zone would be counted twice, resulting in negative values
being printed in the mbuf free count.
Some further refinement of reporting relating to secondary zones may
still be required.
Reported by: ssouhlal
MFC after: 3 days
Notes
Notes:
svn path=/head/; revision=148170
Diffstat (limited to 'lib/libmemstat/memstat.h')
-rw-r--r-- | lib/libmemstat/memstat.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libmemstat/memstat.h b/lib/libmemstat/memstat.h index 262c4df982b1..823338b2636b 100644 --- a/lib/libmemstat/memstat.h +++ b/lib/libmemstat/memstat.h @@ -119,6 +119,7 @@ uint64_t memstat_get_caller_uint64(const struct memory_type *mtp, void memstat_set_caller_uint64(struct memory_type *mtp, int index, uint64_t value); uint64_t memstat_get_zonefree(const struct memory_type *mtp); +uint64_t memstat_get_kegfree(const struct memory_type *mtp); uint64_t memstat_get_percpu_memalloced(const struct memory_type *mtp, int cpu); uint64_t memstat_get_percpu_memfreed(const struct memory_type *mtp, |