diff options
author | peter <peter@FreeBSD.org> | 1998-10-31 17:21:31 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1998-10-31 17:21:31 +0000 |
commit | e5c6a4fa5eb79d781946aee7e3ffa81cc5e38b78 (patch) | |
tree | e042f91af8681263397cb37cbe372ea389671cd8 | |
parent | 29a470890d941fb3684c87bc547351fad2ba4d44 (diff) | |
download | FreeBSD-src-e5c6a4fa5eb79d781946aee7e3ffa81cc5e38b78.zip FreeBSD-src-e5c6a4fa5eb79d781946aee7e3ffa81cc5e38b78.tar.gz |
Add John Dyson's SYSCTL descriptions, and an export of more stats to
a sysctl hierarchy (vm.stats.*). SYSCTL descriptions are only present
in source, they do not get compiled into the binaries taking up memory.
-rw-r--r-- | sys/amd64/amd64/vm_machdep.c | 5 | ||||
-rw-r--r-- | sys/i386/i386/vm_machdep.c | 5 | ||||
-rw-r--r-- | sys/vm/vm_meter.c | 104 | ||||
-rw-r--r-- | sys/vm/vm_pageout.c | 22 | ||||
-rw-r--r-- | sys/vm/vm_zone.c | 8 |
5 files changed, 124 insertions, 20 deletions
diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c index de8b52c..18ebeb3 100644 --- a/sys/amd64/amd64/vm_machdep.c +++ b/sys/amd64/amd64/vm_machdep.c @@ -38,7 +38,7 @@ * * from: @(#)vm_machdep.c 7.3 (Berkeley) 5/13/91 * Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$ - * $Id: vm_machdep.c,v 1.111 1998/09/28 03:34:39 tegge Exp $ + * $Id: vm_machdep.c,v 1.112 1998/10/13 08:24:33 dg Exp $ */ #include "npx.h" @@ -562,7 +562,8 @@ grow(p, sp) static int cnt_prezero; -SYSCTL_INT(_machdep, OID_AUTO, cnt_prezero, CTLFLAG_RD, &cnt_prezero, 0, ""); +SYSCTL_INT(_vm_stats_misc, OID_AUTO, + cnt_prezero, CTLFLAG_RD, &cnt_prezero, 0, ""); /* * Implement the pre-zeroed page mechanism. diff --git a/sys/i386/i386/vm_machdep.c b/sys/i386/i386/vm_machdep.c index de8b52c..18ebeb3 100644 --- a/sys/i386/i386/vm_machdep.c +++ b/sys/i386/i386/vm_machdep.c @@ -38,7 +38,7 @@ * * from: @(#)vm_machdep.c 7.3 (Berkeley) 5/13/91 * Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$ - * $Id: vm_machdep.c,v 1.111 1998/09/28 03:34:39 tegge Exp $ + * $Id: vm_machdep.c,v 1.112 1998/10/13 08:24:33 dg Exp $ */ #include "npx.h" @@ -562,7 +562,8 @@ grow(p, sp) static int cnt_prezero; -SYSCTL_INT(_machdep, OID_AUTO, cnt_prezero, CTLFLAG_RD, &cnt_prezero, 0, ""); +SYSCTL_INT(_vm_stats_misc, OID_AUTO, + cnt_prezero, CTLFLAG_RD, &cnt_prezero, 0, ""); /* * Implement the pre-zeroed page mechanism. diff --git a/sys/vm/vm_meter.c b/sys/vm/vm_meter.c index 4879535..5bc74bd 100644 --- a/sys/vm/vm_meter.c +++ b/sys/vm/vm_meter.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)vm_meter.c 8.4 (Berkeley) 1/4/94 - * $Id: vm_meter.c,v 1.25 1998/03/30 09:56:49 phk Exp $ + * $Id: vm_meter.c,v 1.26 1998/08/24 08:39:37 dfr Exp $ */ #include <sys/param.h> @@ -42,6 +42,8 @@ #include <sys/vmmeter.h> #include <vm/vm.h> +#include <vm/vm_prot.h> +#include <vm/vm_page.h> #include <vm/vm_extern.h> #include <vm/vm_param.h> #include <sys/lock.h> @@ -215,3 +217,103 @@ vmtotal SYSCTL_HANDLER_ARGS SYSCTL_PROC(_vm, VM_METER, vmmeter, CTLTYPE_OPAQUE|CTLFLAG_RD, 0, sizeof(struct vmtotal), vmtotal, "S,vmtotal", ""); +SYSCTL_NODE(_vm, OID_AUTO, stats, CTLFLAG_RW, 0, "VM meter stats"); +SYSCTL_NODE(_vm_stats, OID_AUTO, sys, CTLFLAG_RW, 0, "VM meter sys stats"); +SYSCTL_NODE(_vm_stats, OID_AUTO, vm, CTLFLAG_RW, 0, "VM meter vm stats"); +SYSCTL_NODE(_vm_stats, OID_AUTO, misc, CTLFLAG_RW, 0, "VM meter misc stats"); +SYSCTL_INT(_vm_stats_sys, OID_AUTO, + v_swtch, CTLFLAG_RD, &cnt.v_swtch, 0, "Context switches"); +SYSCTL_INT(_vm_stats_sys, OID_AUTO, + v_trap, CTLFLAG_RD, &cnt.v_trap, 0, "Traps"); +SYSCTL_INT(_vm_stats_sys, OID_AUTO, + v_syscall, CTLFLAG_RD, &cnt.v_syscall, 0, "Syscalls"); +SYSCTL_INT(_vm_stats_sys, OID_AUTO, + v_intr, CTLFLAG_RD, &cnt.v_intr, 0, "HW intr"); +SYSCTL_INT(_vm_stats_sys, OID_AUTO, + v_soft, CTLFLAG_RD, &cnt.v_soft, 0, "SW intr"); +SYSCTL_INT(_vm_stats_vm, OID_AUTO, + v_vm_faults, CTLFLAG_RD, &cnt.v_vm_faults, 0, "VM faults"); +SYSCTL_INT(_vm_stats_vm, OID_AUTO, + v_cow_faults, CTLFLAG_RD, &cnt.v_cow_faults, 0, "COW faults"); +SYSCTL_INT(_vm_stats_vm, OID_AUTO, + v_cow_optim, CTLFLAG_RD, &cnt.v_cow_optim, 0, "Optimized COW faults"); +SYSCTL_INT(_vm_stats_vm, OID_AUTO, + v_zfod, CTLFLAG_RD, &cnt.v_zfod, 0, "Zero fill"); +SYSCTL_INT(_vm_stats_vm, OID_AUTO, + v_ozfod, CTLFLAG_RD, &cnt.v_ozfod, 0, "Optimized zero fill"); +SYSCTL_INT(_vm_stats_vm, OID_AUTO, + v_swapin, CTLFLAG_RD, &cnt.v_swapin, 0, "Swapin operations"); +SYSCTL_INT(_vm_stats_vm, OID_AUTO, + v_swapout, CTLFLAG_RD, &cnt.v_swapout, 0, "Swapout operations"); +SYSCTL_INT(_vm_stats_vm, OID_AUTO, + v_swappgsin, CTLFLAG_RD, &cnt.v_swappgsin, 0, "Swapin pages"); +SYSCTL_INT(_vm_stats_vm, OID_AUTO, + v_swappgsout, CTLFLAG_RD, &cnt.v_swappgsout, 0, "Swapout pages"); +SYSCTL_INT(_vm_stats_vm, OID_AUTO, + v_vnodein, CTLFLAG_RD, &cnt.v_vnodein, 0, "Vnodein operations"); +SYSCTL_INT(_vm_stats_vm, OID_AUTO, + v_vnodeout, CTLFLAG_RD, &cnt.v_vnodeout, 0, "Vnodeout operations"); +SYSCTL_INT(_vm_stats_vm, OID_AUTO, + v_vnodepgsin, CTLFLAG_RD, &cnt.v_vnodepgsin, 0, "Vnodein pages"); +SYSCTL_INT(_vm_stats_vm, OID_AUTO, + v_vnodepgsout, CTLFLAG_RD, &cnt.v_vnodepgsout, 0, "Vnodeout pages"); +SYSCTL_INT(_vm_stats_vm, OID_AUTO, + v_intrans, CTLFLAG_RD, &cnt.v_intrans, 0, "In transit page blocking"); +SYSCTL_INT(_vm_stats_vm, OID_AUTO, + v_reactivated, CTLFLAG_RD, &cnt.v_reactivated, 0, "Reactivated pages"); +SYSCTL_INT(_vm_stats_vm, OID_AUTO, + v_pdwakeups, CTLFLAG_RD, &cnt.v_pdwakeups, 0, "Pagedaemon wakeups"); +SYSCTL_INT(_vm_stats_vm, OID_AUTO, + v_pdpages, CTLFLAG_RD, &cnt.v_pdpages, 0, "Pagedaemon page scans"); +SYSCTL_INT(_vm_stats_vm, OID_AUTO, + v_dfree, CTLFLAG_RD, &cnt.v_dfree, 0, ""); +SYSCTL_INT(_vm_stats_vm, OID_AUTO, + v_pfree, CTLFLAG_RD, &cnt.v_pfree, 0, ""); +SYSCTL_INT(_vm_stats_vm, OID_AUTO, + v_tfree, CTLFLAG_RD, &cnt.v_tfree, 0, ""); +SYSCTL_INT(_vm_stats_vm, OID_AUTO, + v_page_size, CTLFLAG_RD, &cnt.v_page_size, 0, ""); +SYSCTL_INT(_vm_stats_vm, OID_AUTO, + v_page_count, CTLFLAG_RD, &cnt.v_page_count, 0, ""); +SYSCTL_INT(_vm_stats_vm, OID_AUTO, + v_free_reserved, CTLFLAG_RD, &cnt.v_free_reserved, 0, ""); +SYSCTL_INT(_vm_stats_vm, OID_AUTO, + v_free_target, CTLFLAG_RD, &cnt.v_free_target, 0, ""); +SYSCTL_INT(_vm_stats_vm, OID_AUTO, + v_free_min, CTLFLAG_RD, &cnt.v_free_min, 0, ""); +SYSCTL_INT(_vm_stats_vm, OID_AUTO, + v_free_count, CTLFLAG_RD, &cnt.v_free_count, 0, ""); +SYSCTL_INT(_vm_stats_vm, OID_AUTO, + v_wire_count, CTLFLAG_RD, &cnt.v_wire_count, 0, ""); +SYSCTL_INT(_vm_stats_vm, OID_AUTO, + v_active_count, CTLFLAG_RD, &cnt.v_active_count, 0, ""); +SYSCTL_INT(_vm_stats_vm, OID_AUTO, + v_inactive_target, CTLFLAG_RD, &cnt.v_inactive_target, 0, ""); +SYSCTL_INT(_vm_stats_vm, OID_AUTO, + v_inactive_count, CTLFLAG_RD, &cnt.v_inactive_count, 0, ""); +SYSCTL_INT(_vm_stats_vm, OID_AUTO, + v_cache_count, CTLFLAG_RD, &cnt.v_cache_count, 0, ""); +SYSCTL_INT(_vm_stats_vm, OID_AUTO, + v_cache_min, CTLFLAG_RD, &cnt.v_cache_min, 0, ""); +SYSCTL_INT(_vm_stats_vm, OID_AUTO, + v_cache_max, CTLFLAG_RD, &cnt.v_cache_max, 0, ""); +SYSCTL_INT(_vm_stats_vm, OID_AUTO, + v_pageout_free_min, CTLFLAG_RD, &cnt.v_pageout_free_min, 0, ""); +SYSCTL_INT(_vm_stats_vm, OID_AUTO, + v_interrupt_free_min, CTLFLAG_RD, &cnt.v_interrupt_free_min, 0, ""); +SYSCTL_INT(_vm_stats_misc, OID_AUTO, + zero_page_count, CTLFLAG_RD, &vm_page_zero_count, 0, ""); +#if 0 +SYSCTL_INT(_vm_stats_misc, OID_AUTO, + page_mask, CTLFLAG_RD, &page_mask, 0, ""); +SYSCTL_INT(_vm_stats_misc, OID_AUTO, + page_shift, CTLFLAG_RD, &page_shift, 0, ""); +SYSCTL_INT(_vm_stats_misc, OID_AUTO, + first_page, CTLFLAG_RD, &first_page, 0, ""); +SYSCTL_INT(_vm_stats_misc, OID_AUTO, + last_page, CTLFLAG_RD, &last_page, 0, ""); +SYSCTL_INT(_vm_stats_misc, OID_AUTO, + vm_page_bucket_count, CTLFLAG_RD, &vm_page_bucket_count, 0, ""); +SYSCTL_INT(_vm_stats_misc, OID_AUTO, + vm_page_hash_mask, CTLFLAG_RD, &vm_page_hash_mask, 0, ""); +#endif diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c index 5c2a842..606981f 100644 --- a/sys/vm/vm_pageout.c +++ b/sys/vm/vm_pageout.c @@ -65,7 +65,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: vm_pageout.c,v 1.127 1998/09/29 17:33:59 abial Exp $ + * $Id: vm_pageout.c,v 1.128 1998/10/25 17:44:59 phk Exp $ */ /* @@ -155,19 +155,19 @@ static int vm_swap_idle_enabled=0; #endif SYSCTL_INT(_vm, VM_PAGEOUT_ALGORITHM, pageout_algorithm, - CTLFLAG_RW, &vm_pageout_algorithm_lru, 0, ""); + CTLFLAG_RW, &vm_pageout_algorithm_lru, 0, "LRU page mgmt"); SYSCTL_INT(_vm, OID_AUTO, pageout_stats_max, - CTLFLAG_RW, &vm_pageout_stats_max, 0, ""); + CTLFLAG_RW, &vm_pageout_stats_max, 0, "Max pageout stats scan length"); SYSCTL_INT(_vm, OID_AUTO, pageout_full_stats_interval, - CTLFLAG_RW, &vm_pageout_full_stats_interval, 0, ""); + CTLFLAG_RW, &vm_pageout_full_stats_interval, 0, "Interval for full stats scan"); SYSCTL_INT(_vm, OID_AUTO, pageout_stats_interval, - CTLFLAG_RW, &vm_pageout_stats_interval, 0, ""); + CTLFLAG_RW, &vm_pageout_stats_interval, 0, "Interval for partial stats scan"); SYSCTL_INT(_vm, OID_AUTO, pageout_stats_free_max, - CTLFLAG_RW, &vm_pageout_stats_free_max, 0, ""); + CTLFLAG_RW, &vm_pageout_stats_free_max, 0, "Not implemented"); #if defined(NO_SWAPPING) SYSCTL_INT(_vm, VM_SWAPPING_ENABLED, swap_enabled, @@ -176,19 +176,19 @@ SYSCTL_INT(_vm, OID_AUTO, swap_idle_enabled, CTLFLAG_RD, &vm_swap_idle_enabled, 0, ""); #else SYSCTL_INT(_vm, VM_SWAPPING_ENABLED, swap_enabled, - CTLFLAG_RW, &vm_swap_enabled, 0, ""); + CTLFLAG_RW, &vm_swap_enabled, 0, "Enable entire process swapout"); SYSCTL_INT(_vm, OID_AUTO, swap_idle_enabled, - CTLFLAG_RW, &vm_swap_idle_enabled, 0, ""); + CTLFLAG_RW, &vm_swap_idle_enabled, 0, "Allow swapout on idle criteria"); #endif SYSCTL_INT(_vm, OID_AUTO, defer_swapspace_pageouts, - CTLFLAG_RW, &defer_swap_pageouts, 0, ""); + CTLFLAG_RW, &defer_swap_pageouts, 0, "Give preference to dirty pages in mem"); SYSCTL_INT(_vm, OID_AUTO, disable_swapspace_pageouts, - CTLFLAG_RW, &disable_swap_pageouts, 0, ""); + CTLFLAG_RW, &disable_swap_pageouts, 0, "Disallow swapout of dirty pages"); SYSCTL_INT(_vm, OID_AUTO, max_page_launder, - CTLFLAG_RW, &max_page_launder, 0, ""); + CTLFLAG_RW, &max_page_launder, 0, "Maximum number of pages to clean per pass"); #define VM_PAGEOUT_PAGE_COUNT 16 diff --git a/sys/vm/vm_zone.c b/sys/vm/vm_zone.c index 11a7ae0..910c621 100644 --- a/sys/vm/vm_zone.c +++ b/sys/vm/vm_zone.c @@ -11,7 +11,7 @@ * 2. Absolutely no warranty of function or purpose is made by the author * John S. Dyson. * - * $Id: vm_zone.c,v 1.21 1998/04/25 04:50:01 dyson Exp $ + * $Id: vm_zone.c,v 1.22 1998/10/09 00:24:49 jdp Exp $ */ #include <sys/param.h> @@ -459,8 +459,8 @@ SYSCTL_OID(_vm, OID_AUTO, zone, CTLTYPE_STRING|CTLFLAG_RD, \ NULL, 0, sysctl_vm_zone, "A", "Zone Info"); SYSCTL_INT(_vm, OID_AUTO, zone_kmem_pages, - CTLFLAG_RD, &zone_kmem_pages, 0, ""); + CTLFLAG_RD, &zone_kmem_pages, 0, "Number of interrupt safe pages allocated by zone"); SYSCTL_INT(_vm, OID_AUTO, zone_kmem_kvaspace, - CTLFLAG_RD, &zone_kmem_kvaspace, 0, ""); + CTLFLAG_RD, &zone_kmem_kvaspace, 0, "KVA space allocated by zone"); SYSCTL_INT(_vm, OID_AUTO, zone_kern_pages, - CTLFLAG_RD, &zone_kern_pages, 0, ""); + CTLFLAG_RD, &zone_kern_pages, 0, "Number of non-interrupt safe pages allocated by zone"); |