vm_meter.c revision 72200
11541Srgrimes/*
21541Srgrimes * Copyright (c) 1982, 1986, 1989, 1993
31541Srgrimes *	The Regents of the University of California.  All rights reserved.
41541Srgrimes *
51541Srgrimes * Redistribution and use in source and binary forms, with or without
61541Srgrimes * modification, are permitted provided that the following conditions
71541Srgrimes * are met:
81541Srgrimes * 1. Redistributions of source code must retain the above copyright
91541Srgrimes *    notice, this list of conditions and the following disclaimer.
101541Srgrimes * 2. Redistributions in binary form must reproduce the above copyright
111541Srgrimes *    notice, this list of conditions and the following disclaimer in the
121541Srgrimes *    documentation and/or other materials provided with the distribution.
131541Srgrimes * 3. All advertising materials mentioning features or use of this software
1458705Scharnier *    must display the following acknowledgement:
151541Srgrimes *	This product includes software developed by the University of
161541Srgrimes *	California, Berkeley and its contributors.
171541Srgrimes * 4. Neither the name of the University nor the names of its contributors
181541Srgrimes *    may be used to endorse or promote products derived from this software
191541Srgrimes *    without specific prior written permission.
201541Srgrimes *
211541Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
221541Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
231541Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
241541Srgrimes * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
251541Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
261541Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
271541Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
281541Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
291541Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
301541Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
311541Srgrimes * SUCH DAMAGE.
321541Srgrimes *
331541Srgrimes *	@(#)vm_meter.c	8.4 (Berkeley) 1/4/94
3450477Speter * $FreeBSD: head/sys/vm/vm_meter.c 72200 2001-02-09 06:11:45Z bmilekic $
351541Srgrimes */
361541Srgrimes
371541Srgrimes#include <sys/param.h>
381541Srgrimes#include <sys/proc.h>
391541Srgrimes#include <sys/systm.h>
401541Srgrimes#include <sys/kernel.h>
4134924Sbde#include <sys/resource.h>
4212662Sdg#include <sys/vmmeter.h>
4312662Sdg
441541Srgrimes#include <vm/vm.h>
4540794Speter#include <vm/vm_page.h>
4612726Sbde#include <vm/vm_extern.h>
4712662Sdg#include <vm/vm_param.h>
4822521Sdyson#include <sys/lock.h>
4912662Sdg#include <vm/pmap.h>
5012662Sdg#include <vm/vm_map.h>
5112662Sdg#include <vm/vm_object.h>
521541Srgrimes#include <sys/sysctl.h>
531541Srgrimes
5412623Sphkstruct loadavg averunnable =
5512623Sphk	{ {0, 0, 0}, FSCALE };	/* load average, of runnable procs */
5612623Sphk
579759Sbdestruct vmmeter cnt;
581541Srgrimes
5912820Sphkstatic int maxslp = MAXSLP;
601541Srgrimes
611541Srgrimes/*
621541Srgrimes * Constants for averages over 1, 5, and 15 minutes
631541Srgrimes * when sampling at 5 second intervals.
641541Srgrimes */
6512820Sphkstatic fixpt_t cexp[3] = {
661541Srgrimes	0.9200444146293232 * FSCALE,	/* exp(-1/12) */
671541Srgrimes	0.9834714538216174 * FSCALE,	/* exp(-1/60) */
681541Srgrimes	0.9944598480048967 * FSCALE,	/* exp(-1/180) */
691541Srgrimes};
701541Srgrimes
711541Srgrimes/*
721541Srgrimes * Compute a tenex style load average of a quantity on
731541Srgrimes * 1, 5 and 15 minute intervals.
741541Srgrimes */
759507Sdgstatic void
7612286Sphkloadav(struct loadavg *avg)
771541Srgrimes{
781541Srgrimes	register int i, nrun;
791541Srgrimes	register struct proc *p;
801541Srgrimes
8169947Sjake	ALLPROC_LOCK(AP_SHARED);
8271999Sphk	for (nrun = 0, p = LIST_FIRST(&allproc); p != 0; p = LIST_NEXT(p, p_list)) {
831541Srgrimes		switch (p->p_stat) {
841541Srgrimes		case SSLEEP:
851541Srgrimes			if (p->p_priority > PZERO || p->p_slptime != 0)
861541Srgrimes				continue;
8758634Scharnier			/* FALLTHROUGH */
881541Srgrimes		case SRUN:
8965904Sjhb			if ((p->p_flag & P_NOLOAD) != 0)
9065904Sjhb				continue;
9165904Sjhb			/* FALLTHROUGH */
921541Srgrimes		case SIDL:
931541Srgrimes			nrun++;
941541Srgrimes		}
951541Srgrimes	}
9669947Sjake	ALLPROC_LOCK(AP_RELEASE);
971541Srgrimes	for (i = 0; i < 3; i++)
981541Srgrimes		avg->ldavg[i] = (cexp[i] * avg->ldavg[i] +
995455Sdg		    nrun * FSCALE * (FSCALE - cexp[i])) >> FSHIFT;
1001541Srgrimes}
1011541Srgrimes
1029507Sdgvoid
1039507Sdgvmmeter()
1049507Sdg{
1059507Sdg
10634961Sphk	if (time_second % 5 == 0)
1079507Sdg		loadav(&averunnable);
1089507Sdg	if (proc0.p_slptime > maxslp / 2)
1099507Sdg		wakeup(&proc0);
1109507Sdg}
1119507Sdg
11262622SjhbSYSCTL_UINT(_vm, VM_V_FREE_MIN, v_free_min,
11312286Sphk	CTLFLAG_RW, &cnt.v_free_min, 0, "");
11462622SjhbSYSCTL_UINT(_vm, VM_V_FREE_TARGET, v_free_target,
11512286Sphk	CTLFLAG_RW, &cnt.v_free_target, 0, "");
11662622SjhbSYSCTL_UINT(_vm, VM_V_FREE_RESERVED, v_free_reserved,
11712286Sphk	CTLFLAG_RW, &cnt.v_free_reserved, 0, "");
11862622SjhbSYSCTL_UINT(_vm, VM_V_INACTIVE_TARGET, v_inactive_target,
11912286Sphk	CTLFLAG_RW, &cnt.v_inactive_target, 0, "");
12062622SjhbSYSCTL_UINT(_vm, VM_V_CACHE_MIN, v_cache_min,
12112286Sphk	CTLFLAG_RW, &cnt.v_cache_min, 0, "");
12262622SjhbSYSCTL_UINT(_vm, VM_V_CACHE_MAX, v_cache_max,
12312286Sphk	CTLFLAG_RW, &cnt.v_cache_max, 0, "");
12462622SjhbSYSCTL_UINT(_vm, VM_V_PAGEOUT_FREE_MIN, v_pageout_free_min,
12512286Sphk	CTLFLAG_RW, &cnt.v_pageout_free_min, 0, "");
12662622SjhbSYSCTL_UINT(_vm, OID_AUTO, v_free_severe,
12751337Sdillon	CTLFLAG_RW, &cnt.v_free_severe, 0, "");
12812286Sphk
12946381SbillfSYSCTL_STRUCT(_vm, VM_LOADAVG, loadavg, CTLFLAG_RD,
13046381Sbillf    &averunnable, loadavg, "Machine loadaverage history");
1311541Srgrimes
13212286Sphkstatic int
13362573Sphkvmtotal(SYSCTL_HANDLER_ARGS)
1341541Srgrimes{
13512286Sphk	struct proc *p;
13612286Sphk	struct vmtotal total, *totalp;
13712286Sphk	vm_map_entry_t entry;
13812286Sphk	vm_object_t object;
13912286Sphk	vm_map_t map;
1401541Srgrimes	int paging;
1411541Srgrimes
14212286Sphk	totalp = &total;
1431541Srgrimes	bzero(totalp, sizeof *totalp);
1441541Srgrimes	/*
1451541Srgrimes	 * Mark all objects as inactive.
1461541Srgrimes	 */
14771572Sjhb	TAILQ_FOREACH(object, &vm_object_list, object_list)
14838517Sdfr		vm_object_clear_flag(object, OBJ_ACTIVE);
1491541Srgrimes	/*
1501541Srgrimes	 * Calculate process statistics.
1511541Srgrimes	 */
15269947Sjake	ALLPROC_LOCK(AP_SHARED);
15371572Sjhb	LIST_FOREACH(p, &allproc, p_list) {
1541541Srgrimes		if (p->p_flag & P_SYSTEM)
1551541Srgrimes			continue;
15672200Sbmilekic		mtx_lock_spin(&sched_lock);
1571541Srgrimes		switch (p->p_stat) {
1581541Srgrimes		case 0:
15972200Sbmilekic			mtx_unlock_spin(&sched_lock);
1601541Srgrimes			continue;
1611541Srgrimes
16265557Sjasone		case SMTX:
1631541Srgrimes		case SSLEEP:
1641541Srgrimes		case SSTOP:
16571572Sjhb			if (p->p_sflag & PS_INMEM) {
1661541Srgrimes				if (p->p_priority <= PZERO)
1671541Srgrimes					totalp->t_dw++;
1681541Srgrimes				else if (p->p_slptime < maxslp)
1691541Srgrimes					totalp->t_sl++;
1701541Srgrimes			} else if (p->p_slptime < maxslp)
1711541Srgrimes				totalp->t_sw++;
17271572Sjhb			if (p->p_slptime >= maxslp) {
17372200Sbmilekic				mtx_unlock_spin(&sched_lock);
1741541Srgrimes				continue;
17571572Sjhb			}
1761541Srgrimes			break;
1771541Srgrimes
17865557Sjasone		case SWAIT:
17965557Sjasone			totalp->t_sl++;
18065557Sjasone			continue;
18165557Sjasone
1821541Srgrimes		case SRUN:
1831541Srgrimes		case SIDL:
18471572Sjhb			if (p->p_sflag & PS_INMEM)
1851541Srgrimes				totalp->t_rq++;
1861541Srgrimes			else
1871541Srgrimes				totalp->t_sw++;
18871572Sjhb			if (p->p_stat == SIDL) {
18972200Sbmilekic				mtx_unlock_spin(&sched_lock);
1901541Srgrimes				continue;
19171572Sjhb			}
1921541Srgrimes			break;
1931541Srgrimes		}
19472200Sbmilekic		mtx_unlock_spin(&sched_lock);
1951541Srgrimes		/*
1961541Srgrimes		 * Note active objects.
1971541Srgrimes		 */
1981541Srgrimes		paging = 0;
1991541Srgrimes		for (map = &p->p_vmspace->vm_map, entry = map->header.next;
2005455Sdg		    entry != &map->header; entry = entry->next) {
20143748Sdillon			if ((entry->eflags & MAP_ENTRY_IS_SUB_MAP) ||
2021541Srgrimes			    entry->object.vm_object == NULL)
2031541Srgrimes				continue;
20438517Sdfr			vm_object_set_flag(entry->object.vm_object, OBJ_ACTIVE);
2051541Srgrimes			paging |= entry->object.vm_object->paging_in_progress;
2061541Srgrimes		}
2071541Srgrimes		if (paging)
2081541Srgrimes			totalp->t_pw++;
2091541Srgrimes	}
21069947Sjake	ALLPROC_LOCK(AP_RELEASE);
2111541Srgrimes	/*
2121541Srgrimes	 * Calculate object memory usage statistics.
2131541Srgrimes	 */
21415809Sdyson	for (object = TAILQ_FIRST(&vm_object_list);
2155455Sdg	    object != NULL;
21615809Sdyson	    object = TAILQ_NEXT(object, object_list)) {
21742957Sdillon		/*
21842957Sdillon		 * devices, like /dev/mem, will badly skew our totals
21942957Sdillon		 */
22042957Sdillon		if (object->type == OBJT_DEVICE)
22142957Sdillon			continue;
22218169Sdyson		totalp->t_vm += object->size;
2231541Srgrimes		totalp->t_rm += object->resident_page_count;
2241541Srgrimes		if (object->flags & OBJ_ACTIVE) {
22518169Sdyson			totalp->t_avm += object->size;
2261541Srgrimes			totalp->t_arm += object->resident_page_count;
2271541Srgrimes		}
22818169Sdyson		if (object->shadow_count > 1) {
2291541Srgrimes			/* shared object */
23018169Sdyson			totalp->t_vmshr += object->size;
2311541Srgrimes			totalp->t_rmshr += object->resident_page_count;
2321541Srgrimes			if (object->flags & OBJ_ACTIVE) {
23318169Sdyson				totalp->t_avmshr += object->size;
2341541Srgrimes				totalp->t_armshr += object->resident_page_count;
2351541Srgrimes			}
2361541Srgrimes		}
2371541Srgrimes	}
2385455Sdg	totalp->t_free = cnt.v_free_count + cnt.v_cache_count;
23912286Sphk	return (sysctl_handle_opaque(oidp, totalp, sizeof total, req));
2401541Srgrimes}
24112286Sphk
24212286SphkSYSCTL_PROC(_vm, VM_METER, vmmeter, CTLTYPE_OPAQUE|CTLFLAG_RD,
24346381Sbillf    0, sizeof(struct vmtotal), vmtotal, "S,vmtotal",
24446381Sbillf    "System virtual memory statistics");
24540794SpeterSYSCTL_NODE(_vm, OID_AUTO, stats, CTLFLAG_RW, 0, "VM meter stats");
24640794SpeterSYSCTL_NODE(_vm_stats, OID_AUTO, sys, CTLFLAG_RW, 0, "VM meter sys stats");
24740794SpeterSYSCTL_NODE(_vm_stats, OID_AUTO, vm, CTLFLAG_RW, 0, "VM meter vm stats");
24840794SpeterSYSCTL_NODE(_vm_stats, OID_AUTO, misc, CTLFLAG_RW, 0, "VM meter misc stats");
24962622SjhbSYSCTL_UINT(_vm_stats_sys, OID_AUTO,
25040794Speter	v_swtch, CTLFLAG_RD, &cnt.v_swtch, 0, "Context switches");
25162622SjhbSYSCTL_UINT(_vm_stats_sys, OID_AUTO,
25240794Speter	v_trap, CTLFLAG_RD, &cnt.v_trap, 0, "Traps");
25362622SjhbSYSCTL_UINT(_vm_stats_sys, OID_AUTO,
25440794Speter	v_syscall, CTLFLAG_RD, &cnt.v_syscall, 0, "Syscalls");
25562622SjhbSYSCTL_UINT(_vm_stats_sys, OID_AUTO, v_intr, CTLFLAG_RD,
25646381Sbillf    &cnt.v_intr, 0, "Hardware interrupts");
25762622SjhbSYSCTL_UINT(_vm_stats_sys, OID_AUTO, v_soft, CTLFLAG_RD,
25846381Sbillf    &cnt.v_soft, 0, "Software interrupts");
25962622SjhbSYSCTL_UINT(_vm_stats_vm, OID_AUTO,
26040794Speter	v_vm_faults, CTLFLAG_RD, &cnt.v_vm_faults, 0, "VM faults");
26162622SjhbSYSCTL_UINT(_vm_stats_vm, OID_AUTO,
26240794Speter	v_cow_faults, CTLFLAG_RD, &cnt.v_cow_faults, 0, "COW faults");
26362622SjhbSYSCTL_UINT(_vm_stats_vm, OID_AUTO,
26440794Speter	v_cow_optim, CTLFLAG_RD, &cnt.v_cow_optim, 0, "Optimized COW faults");
26562622SjhbSYSCTL_UINT(_vm_stats_vm, OID_AUTO,
26640794Speter	v_zfod, CTLFLAG_RD, &cnt.v_zfod, 0, "Zero fill");
26762622SjhbSYSCTL_UINT(_vm_stats_vm, OID_AUTO,
26840794Speter	v_ozfod, CTLFLAG_RD, &cnt.v_ozfod, 0, "Optimized zero fill");
26962622SjhbSYSCTL_UINT(_vm_stats_vm, OID_AUTO,
27040794Speter	v_swapin, CTLFLAG_RD, &cnt.v_swapin, 0, "Swapin operations");
27162622SjhbSYSCTL_UINT(_vm_stats_vm, OID_AUTO,
27240794Speter	v_swapout, CTLFLAG_RD, &cnt.v_swapout, 0, "Swapout operations");
27362622SjhbSYSCTL_UINT(_vm_stats_vm, OID_AUTO,
27440794Speter	v_swappgsin, CTLFLAG_RD, &cnt.v_swappgsin, 0, "Swapin pages");
27562622SjhbSYSCTL_UINT(_vm_stats_vm, OID_AUTO,
27640794Speter	v_swappgsout, CTLFLAG_RD, &cnt.v_swappgsout, 0, "Swapout pages");
27762622SjhbSYSCTL_UINT(_vm_stats_vm, OID_AUTO,
27840794Speter	v_vnodein, CTLFLAG_RD, &cnt.v_vnodein, 0, "Vnodein operations");
27962622SjhbSYSCTL_UINT(_vm_stats_vm, OID_AUTO,
28040794Speter	v_vnodeout, CTLFLAG_RD, &cnt.v_vnodeout, 0, "Vnodeout operations");
28162622SjhbSYSCTL_UINT(_vm_stats_vm, OID_AUTO,
28240794Speter	v_vnodepgsin, CTLFLAG_RD, &cnt.v_vnodepgsin, 0, "Vnodein pages");
28362622SjhbSYSCTL_UINT(_vm_stats_vm, OID_AUTO,
28440794Speter	v_vnodepgsout, CTLFLAG_RD, &cnt.v_vnodepgsout, 0, "Vnodeout pages");
28562622SjhbSYSCTL_UINT(_vm_stats_vm, OID_AUTO,
28640794Speter	v_intrans, CTLFLAG_RD, &cnt.v_intrans, 0, "In transit page blocking");
28762622SjhbSYSCTL_UINT(_vm_stats_vm, OID_AUTO,
28840794Speter	v_reactivated, CTLFLAG_RD, &cnt.v_reactivated, 0, "Reactivated pages");
28962622SjhbSYSCTL_UINT(_vm_stats_vm, OID_AUTO,
29040794Speter	v_pdwakeups, CTLFLAG_RD, &cnt.v_pdwakeups, 0, "Pagedaemon wakeups");
29162622SjhbSYSCTL_UINT(_vm_stats_vm, OID_AUTO,
29240794Speter	v_pdpages, CTLFLAG_RD, &cnt.v_pdpages, 0, "Pagedaemon page scans");
29362622SjhbSYSCTL_UINT(_vm_stats_vm, OID_AUTO,
29440794Speter	v_dfree, CTLFLAG_RD, &cnt.v_dfree, 0, "");
29562622SjhbSYSCTL_UINT(_vm_stats_vm, OID_AUTO,
29640794Speter	v_pfree, CTLFLAG_RD, &cnt.v_pfree, 0, "");
29762622SjhbSYSCTL_UINT(_vm_stats_vm, OID_AUTO,
29840794Speter	v_tfree, CTLFLAG_RD, &cnt.v_tfree, 0, "");
29962622SjhbSYSCTL_UINT(_vm_stats_vm, OID_AUTO,
30040794Speter	v_page_size, CTLFLAG_RD, &cnt.v_page_size, 0, "");
30162622SjhbSYSCTL_UINT(_vm_stats_vm, OID_AUTO,
30240794Speter	v_page_count, CTLFLAG_RD, &cnt.v_page_count, 0, "");
30362622SjhbSYSCTL_UINT(_vm_stats_vm, OID_AUTO,
30440794Speter	v_free_reserved, CTLFLAG_RD, &cnt.v_free_reserved, 0, "");
30562622SjhbSYSCTL_UINT(_vm_stats_vm, OID_AUTO,
30640794Speter	v_free_target, CTLFLAG_RD, &cnt.v_free_target, 0, "");
30762622SjhbSYSCTL_UINT(_vm_stats_vm, OID_AUTO,
30840794Speter	v_free_min, CTLFLAG_RD, &cnt.v_free_min, 0, "");
30962622SjhbSYSCTL_UINT(_vm_stats_vm, OID_AUTO,
31040794Speter	v_free_count, CTLFLAG_RD, &cnt.v_free_count, 0, "");
31162622SjhbSYSCTL_UINT(_vm_stats_vm, OID_AUTO,
31240794Speter	v_wire_count, CTLFLAG_RD, &cnt.v_wire_count, 0, "");
31362622SjhbSYSCTL_UINT(_vm_stats_vm, OID_AUTO,
31440794Speter	v_active_count, CTLFLAG_RD, &cnt.v_active_count, 0, "");
31562622SjhbSYSCTL_UINT(_vm_stats_vm, OID_AUTO,
31640794Speter	v_inactive_target, CTLFLAG_RD, &cnt.v_inactive_target, 0, "");
31762622SjhbSYSCTL_UINT(_vm_stats_vm, OID_AUTO,
31840794Speter	v_inactive_count, CTLFLAG_RD, &cnt.v_inactive_count, 0, "");
31962622SjhbSYSCTL_UINT(_vm_stats_vm, OID_AUTO,
32040794Speter	v_cache_count, CTLFLAG_RD, &cnt.v_cache_count, 0, "");
32162622SjhbSYSCTL_UINT(_vm_stats_vm, OID_AUTO,
32240794Speter	v_cache_min, CTLFLAG_RD, &cnt.v_cache_min, 0, "");
32362622SjhbSYSCTL_UINT(_vm_stats_vm, OID_AUTO,
32440794Speter	v_cache_max, CTLFLAG_RD, &cnt.v_cache_max, 0, "");
32562622SjhbSYSCTL_UINT(_vm_stats_vm, OID_AUTO,
32640794Speter	v_pageout_free_min, CTLFLAG_RD, &cnt.v_pageout_free_min, 0, "");
32762622SjhbSYSCTL_UINT(_vm_stats_vm, OID_AUTO,
32840794Speter	v_interrupt_free_min, CTLFLAG_RD, &cnt.v_interrupt_free_min, 0, "");
32940794SpeterSYSCTL_INT(_vm_stats_misc, OID_AUTO,
33040794Speter	zero_page_count, CTLFLAG_RD, &vm_page_zero_count, 0, "");
33171429SumeSYSCTL_UINT(_vm_stats_vm, OID_AUTO,
33271429Sume	v_forks, CTLFLAG_RD, &cnt.v_forks, 0, "Number of fork() calls");
33371429SumeSYSCTL_UINT(_vm_stats_vm, OID_AUTO,
33471429Sume	v_vforks, CTLFLAG_RD, &cnt.v_vforks, 0, "Number of vfork() calls");
33571429SumeSYSCTL_UINT(_vm_stats_vm, OID_AUTO,
33671429Sume	v_rforks, CTLFLAG_RD, &cnt.v_rforks, 0, "Number of rfork() calls");
33771429SumeSYSCTL_UINT(_vm_stats_vm, OID_AUTO,
33871429Sume	v_kthreads, CTLFLAG_RD, &cnt.v_kthreads, 0, "Number of fork() calls by kernel");
33971429SumeSYSCTL_UINT(_vm_stats_vm, OID_AUTO,
34071429Sume	v_forkpages, CTLFLAG_RD, &cnt.v_forkpages, 0, "VM pages affected by fork()");
34171429SumeSYSCTL_UINT(_vm_stats_vm, OID_AUTO,
34271429Sume	v_vforkpages, CTLFLAG_RD, &cnt.v_vforkpages, 0, "VM pages affected by vfork()");
34371429SumeSYSCTL_UINT(_vm_stats_vm, OID_AUTO,
34471429Sume	v_rforkpages, CTLFLAG_RD, &cnt.v_rforkpages, 0, "VM pages affected by rfork()");
34571429SumeSYSCTL_UINT(_vm_stats_vm, OID_AUTO,
34671429Sume	v_kthreadpages, CTLFLAG_RD, &cnt.v_kthreadpages, 0, "VM pages affected by fork() by kernel");
34740794Speter#if 0
34840794SpeterSYSCTL_INT(_vm_stats_misc, OID_AUTO,
34940794Speter	page_mask, CTLFLAG_RD, &page_mask, 0, "");
35040794SpeterSYSCTL_INT(_vm_stats_misc, OID_AUTO,
35140794Speter	page_shift, CTLFLAG_RD, &page_shift, 0, "");
35240794SpeterSYSCTL_INT(_vm_stats_misc, OID_AUTO,
35340794Speter	first_page, CTLFLAG_RD, &first_page, 0, "");
35440794SpeterSYSCTL_INT(_vm_stats_misc, OID_AUTO,
35540794Speter	last_page, CTLFLAG_RD, &last_page, 0, "");
35640794SpeterSYSCTL_INT(_vm_stats_misc, OID_AUTO,
35740794Speter	vm_page_bucket_count, CTLFLAG_RD, &vm_page_bucket_count, 0, "");
35840794SpeterSYSCTL_INT(_vm_stats_misc, OID_AUTO,
35940794Speter	vm_page_hash_mask, CTLFLAG_RD, &vm_page_hash_mask, 0, "");
36040794Speter#endif
361