diff options
author | Gleb Smirnoff <glebius@FreeBSD.org> | 2014-02-07 14:29:03 +0000 |
---|---|---|
committer | Gleb Smirnoff <glebius@FreeBSD.org> | 2014-02-07 14:29:03 +0000 |
commit | 0a5a3ccb8197ad6617f067274ac91a790f857328 (patch) | |
tree | 68a5dc7c463763f5c4e25deb81c1f1f438b82de4 /share/man/man9/zone.9 | |
parent | 96d111245f2bade053851f9a6572c4f0490170ae (diff) | |
download | src-0a5a3ccb8197ad6617f067274ac91a790f857328.tar.gz src-0a5a3ccb8197ad6617f067274ac91a790f857328.zip |
Provide macros that allow easily export uma(9) zone limits and
current usage via sysctl(9):
SYSCTL_UMA_MAX()
SYSCTL_ADD_UMA_MAX()
SYSCTL_UMA_CUR()
SYSCTL_ADD_UMA_CUR()
Sponsored by: Nginx, Inc.
Notes
Notes:
svn path=/head/; revision=261593
Diffstat (limited to 'share/man/man9/zone.9')
-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 4199268ae7a2..d0af88ec2687 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 |