diff options
author | glebius <glebius@FreeBSD.org> | 2014-03-04 14:21:07 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2014-03-04 14:21:07 +0000 |
commit | 322a3c94d3d120bb067e52cd49285f1c90c17e55 (patch) | |
tree | 6cb50c0b6df9e62fa570c2e5f9f776bb8e61b850 /share | |
parent | 352d508b164f60d6e5de69dba908cd0b34e56a26 (diff) | |
download | FreeBSD-src-322a3c94d3d120bb067e52cd49285f1c90c17e55.zip FreeBSD-src-322a3c94d3d120bb067e52cd49285f1c90c17e55.tar.gz |
Merge 261593 from head:
Provide macros that allow easily export uma(9) zone limits and
current usage via sysctl(9).
Diffstat (limited to 'share')
-rw-r--r-- | share/man/man9/zone.9 | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/share/man/man9/zone.9 b/share/man/man9/zone.9 index 4199268..d0af88e 100644 --- a/share/man/man9/zone.9 +++ b/share/man/man9/zone.9 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 21, 2013 +.Dd February 7, 2014 .Dt ZONE 9 .Os .Sh NAME @@ -71,6 +71,11 @@ .Fn uma_zone_get_cur "uma_zone_t zone" .Ft void .Fn uma_zone_set_warning "uma_zone_t zone" "const char *warning" +.In sys/sysctl.h +.Fn SYSCTL_UMA_MAX parent nbr name access zone descr +.Fn SYSCTL_ADD_UMA_MAX ctx parent nbr name access zone descr +.Fn SYSCTL_UMA_CUR parent nbr name access zone descr +.Fn SYSCTL_ADD_UMA_CUR ctx parent nbr name access zone descr .Sh DESCRIPTION The zone allocator provides an efficient interface for managing dynamically-sized collections of items of similar size. @@ -307,6 +312,38 @@ Warnings can be turned off globally by setting the .Va vm.zone_warnings sysctl tunable to .Va 0 . +.Pp +The +.Fn SYSCTL_UMA_MAX parent nbr name access zone descr +macro declares a static +.Xr sysctl +oid that exports the effective upper limit number of items for a zone. +The +.Fa zone +argument should be a pointer to +.Vt uma_zone_t . +A read of the oid returns value obtained through +.Fn uma_zone_get_max . +A write to the oid sets new value via +.Fn uma_zone_set_max . +The +.Fn SYSCTL_ADD_UMA_MAX ctx parent nbr name access zone descr +macro is provided to create this type of oid dynamically. +.Pp +The +.Fn SYSCTL_UMA_CUR parent nbr name access zone descr +macro declares a static read only +.Xr sysctl +oid that exports the approximate current occupancy of the zone. +The +.Fa zone +argument should be a pointer to +.Vt uma_zone_t . +A read of the oid returns value obtained through +.Fn uma_zone_get_cur . +The +.Fn SYSCTL_ADD_UMA_CUR ctx parent nbr name zone descr +macro is provided to create this type of oid dynamically. .Sh RETURN VALUES The .Fn uma_zalloc |