summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authordyson <dyson@FreeBSD.org>1997-12-14 05:17:44 +0000
committerdyson <dyson@FreeBSD.org>1997-12-14 05:17:44 +0000
commite86cd387f89e6c06d1e853398fe37745904571c3 (patch)
treea76234ffd2e8fb92ac0a4a6c627b2e2867fabe3e /sys
parent7bbd5d48704e983e22e4ac28475e6ec127347953 (diff)
downloadFreeBSD-src-e86cd387f89e6c06d1e853398fe37745904571c3.zip
FreeBSD-src-e86cd387f89e6c06d1e853398fe37745904571c3.tar.gz
Slight improvement to the vm_zone stats output. Also, some other superficial
cleanups.
Diffstat (limited to 'sys')
-rw-r--r--sys/vm/vm_zone.c13
-rw-r--r--sys/vm/vm_zone.h3
2 files changed, 11 insertions, 5 deletions
diff --git a/sys/vm/vm_zone.c b/sys/vm/vm_zone.c
index 1bf9732..5dfbf50 100644
--- a/sys/vm/vm_zone.c
+++ b/sys/vm/vm_zone.c
@@ -18,7 +18,7 @@
* 5. Modifications may be freely made to this file if the above conditions
* are met.
*
- * $Id: vm_zone.c,v 1.10 1997/10/12 20:26:33 phk Exp $
+ * $Id: vm_zone.c,v 1.11 1997/12/05 19:55:52 bde Exp $
*/
#include <sys/param.h>
@@ -83,7 +83,7 @@ zinitna(vm_zone_t z, vm_object_t obj, char *name, int size,
int totsize;
if ((z->zflags & ZONE_BOOT) == 0) {
- z->zsize = (size + 32 - 1) & ~(32 - 1);
+ z->zsize = (size + ZONE_ROUNDING - 1) & ~(ZONE_ROUNDING - 1);
simple_lock_init(&z->zlock);
z->zfreecnt = 0;
z->ztotal = 0;
@@ -366,6 +366,11 @@ sysctl_vm_zone SYSCTL_HANDLER_ARGS
char tmpbuf[128];
char tmpname[14];
+ sprintf(tmpbuf, "\nITEM SIZE LIMIT USED FREE REQUESTS\n");
+ error = SYSCTL_OUT(req, tmpbuf, strlen(tmpbuf));
+ if (error)
+ return (error);
+
for (curzone = zlist; curzone; curzone = nextzone) {
int i;
int len;
@@ -387,8 +392,8 @@ sysctl_vm_zone SYSCTL_HANDLER_ARGS
}
sprintf(tmpbuf + offset,
- "%s limit=%8.8u, used=%6.6u, free=%6.6u, requests=%8.8u\n",
- tmpname, curzone->zmax,
+ "%s %6.6u, %8.8u, %6.6u, %6.6u, %8.8u\n",
+ tmpname, curzone->zsize, curzone->zmax,
(curzone->ztotal - curzone->zfreecnt),
curzone->zfreecnt, curzone->znalloc);
diff --git a/sys/vm/vm_zone.h b/sys/vm/vm_zone.h
index 58d29bf..e1e850f 100644
--- a/sys/vm/vm_zone.h
+++ b/sys/vm/vm_zone.h
@@ -18,7 +18,7 @@
* 5. Modifications may be freely made to this file if the above conditions
* are met.
*
- * $Id: vm_zone.h,v 1.7 1997/09/21 11:41:12 peter Exp $
+ * $Id: vm_zone.h,v 1.8 1997/12/05 19:55:52 bde Exp $
*/
#if !defined(_SYS_ZONE_H)
@@ -68,6 +68,7 @@ void * _zget __P((vm_zone_t z));
#define ZONE_ERROR_NOTFREE 1
#define ZONE_ERROR_ALREADYFREE 2
+#define ZONE_ROUNDING 32
#define ZENTRY_FREE 0x12342378
/*
OpenPOWER on IntegriCloud