]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
vmtotal: extend memory counters to accomodate for current and future
authorkib <kib@FreeBSD.org>
Wed, 15 Nov 2017 13:41:03 +0000 (13:41 +0000)
committerkib <kib@FreeBSD.org>
Wed, 15 Nov 2017 13:41:03 +0000 (13:41 +0000)
commitea07ce4ed02c7a66f42fea913f0e7cae75a58e48
treed21cf0f134e42f02335f2ed069ed62274b683e66
parent0419f346b469d6521d4ba84e75fb1b876bf4a0f5
vmtotal: extend memory counters to accomodate for current and future
hardware sizes.

32bit counters already overflow on approachable virtual memory page
counts, and soon would overflow on the physical pages counts as well.
Bump sizes to 64bit types.  Bump __FreeBSD_version.

It is impossible to provide perfect backward ABI compat for this
change.  If a program requests an old structure, it can be detected by
size.  But if it queries the size first by passing NULL old req
pointer, there is almost nothing we can do to detect the desired ABI.
As a partial solution, check p_osrel of the quering process when
selecting the size to report.

Submitted by: Pawel Biernacki <pawel.biernacki@gmail.com>
Differential revision: https://reviews.freebsd.org/D13018
sys/sys/param.h
sys/sys/vmmeter.h
sys/vm/vm_meter.c