aboutsummaryrefslogtreecommitdiff
path: root/sys/vm
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2021-09-17 16:13:47 +0000
committerMark Johnston <markj@FreeBSD.org>2021-09-17 18:19:05 +0000
commitd6e77cda9be1509ea170142cca3ff0d3b9f12e35 (patch)
tree1d45334934a1880c0dbfcedcbeff64dcbe16fae7 /sys/vm
parent7fabaac2211e7ed1cec9650e46f4e03428411dcf (diff)
downloadsrc-d6e77cda9be1509ea170142cca3ff0d3b9f12e35.tar.gz
src-d6e77cda9be1509ea170142cca3ff0d3b9f12e35.zip
uma: Show the count of free slabs in each per-domain keg's sysctl tree
This is useful for measuring the number of pages that could be freed from a NOFREE zone under memory pressure. MFC after: 1 week Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/uma_core.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c
index cdf3d482679e..12cab490781b 100644
--- a/sys/vm/uma_core.c
+++ b/sys/vm/uma_core.c
@@ -2690,7 +2690,10 @@ zone_alloc_sysctl(uma_zone_t zone, void *unused)
"Total pages currently allocated from VM");
SYSCTL_ADD_U32(NULL, SYSCTL_CHILDREN(oid), OID_AUTO,
"free_items", CTLFLAG_RD, &dom->ud_free_items, 0,
- "items free in the slab layer");
+ "Items free in the slab layer");
+ SYSCTL_ADD_U32(NULL, SYSCTL_CHILDREN(oid), OID_AUTO,
+ "free_slabs", CTLFLAG_RD, &dom->ud_free_slabs, 0,
+ "Unused slabs");
}
} else
SYSCTL_ADD_CONST_STRING(NULL, SYSCTL_CHILDREN(oid), OID_AUTO,