The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/vm/vm_meter.c

Version: -  FREEBSD  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-2  -  FREEBSD-11-1  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-4  -  FREEBSD-10-3  -  FREEBSD-10-2  -  FREEBSD-10-1  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-3  -  FREEBSD-9-2  -  FREEBSD-9-1  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-4  -  FREEBSD-8-3  -  FREEBSD-8-2  -  FREEBSD-8-1  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-4  -  FREEBSD-7-3  -  FREEBSD-7-2  -  FREEBSD-7-1  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-4  -  FREEBSD-6-3  -  FREEBSD-6-2  -  FREEBSD-6-1  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-5  -  FREEBSD-5-4  -  FREEBSD-5-3  -  FREEBSD-5-2  -  FREEBSD-5-1  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  linux-2.6  -  linux-2.4.22  -  MK83  -  MK84  -  PLAN9  -  DFBSD  -  NETBSD  -  NETBSD5  -  NETBSD4  -  NETBSD3  -  NETBSD20  -  OPENBSD  -  xnu-517  -  xnu-792  -  xnu-792.6.70  -  xnu-1228  -  xnu-1456.1.26  -  xnu-1699.24.8  -  xnu-2050.18.24  -  OPENSOLARIS  -  minix-3-1-1 
SearchContext: -  none  -  3  -  10 

    1 /*
    2  * Copyright (c) 1982, 1986, 1989, 1993
    3  *      The Regents of the University of California.  All rights reserved.
    4  *
    5  * Redistribution and use in source and binary forms, with or without
    6  * modification, are permitted provided that the following conditions
    7  * are met:
    8  * 1. Redistributions of source code must retain the above copyright
    9  *    notice, this list of conditions and the following disclaimer.
   10  * 2. Redistributions in binary form must reproduce the above copyright
   11  *    notice, this list of conditions and the following disclaimer in the
   12  *    documentation and/or other materials provided with the distribution.
   13  * 3. All advertising materials mentioning features or use of this software
   14  *    must display the following acknowledgement:
   15  *      This product includes software developed by the University of
   16  *      California, Berkeley and its contributors.
   17  * 4. Neither the name of the University nor the names of its contributors
   18  *    may be used to endorse or promote products derived from this software
   19  *    without specific prior written permission.
   20  *
   21  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   22  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   23  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   24  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   25  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   26  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   27  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   28  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   29  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   30  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   31  * SUCH DAMAGE.
   32  *
   33  *      @(#)vm_meter.c  8.4 (Berkeley) 1/4/94
   34  */
   35 
   36 #include <sys/cdefs.h>
   37 __FBSDID("$FreeBSD: releng/5.2/sys/vm/vm_meter.c 116226 2003-06-11 23:50:51Z obrien $");
   38 
   39 #include <sys/param.h>
   40 #include <sys/systm.h>
   41 #include <sys/kernel.h>
   42 #include <sys/lock.h>
   43 #include <sys/mutex.h>
   44 #include <sys/proc.h>
   45 #include <sys/resource.h>
   46 #include <sys/sx.h>
   47 #include <sys/vmmeter.h>
   48 #include <sys/smp.h>
   49 
   50 #include <vm/vm.h>
   51 #include <vm/vm_page.h>
   52 #include <vm/vm_extern.h>
   53 #include <vm/vm_param.h>
   54 #include <vm/pmap.h>
   55 #include <vm/vm_map.h>
   56 #include <vm/vm_object.h>
   57 #include <sys/sysctl.h>
   58 
   59 struct vmmeter cnt;
   60 
   61 int maxslp = MAXSLP;
   62 
   63 SYSCTL_UINT(_vm, VM_V_FREE_MIN, v_free_min,
   64         CTLFLAG_RW, &cnt.v_free_min, 0, "");
   65 SYSCTL_UINT(_vm, VM_V_FREE_TARGET, v_free_target,
   66         CTLFLAG_RW, &cnt.v_free_target, 0, "");
   67 SYSCTL_UINT(_vm, VM_V_FREE_RESERVED, v_free_reserved,
   68         CTLFLAG_RW, &cnt.v_free_reserved, 0, "");
   69 SYSCTL_UINT(_vm, VM_V_INACTIVE_TARGET, v_inactive_target,
   70         CTLFLAG_RW, &cnt.v_inactive_target, 0, "");
   71 SYSCTL_UINT(_vm, VM_V_CACHE_MIN, v_cache_min,
   72         CTLFLAG_RW, &cnt.v_cache_min, 0, "");
   73 SYSCTL_UINT(_vm, VM_V_CACHE_MAX, v_cache_max,
   74         CTLFLAG_RW, &cnt.v_cache_max, 0, "");
   75 SYSCTL_UINT(_vm, VM_V_PAGEOUT_FREE_MIN, v_pageout_free_min,
   76         CTLFLAG_RW, &cnt.v_pageout_free_min, 0, "");
   77 SYSCTL_UINT(_vm, OID_AUTO, v_free_severe,
   78         CTLFLAG_RW, &cnt.v_free_severe, 0, "");
   79 
   80 SYSCTL_STRUCT(_vm, VM_LOADAVG, loadavg, CTLFLAG_RD, 
   81     &averunnable, loadavg, "Machine loadaverage history");
   82 
   83 static int
   84 vmtotal(SYSCTL_HANDLER_ARGS)
   85 {
   86 /* XXXKSE almost completely broken */
   87         struct proc *p;
   88         struct vmtotal total, *totalp;
   89         vm_map_entry_t entry;
   90         vm_object_t object;
   91         vm_map_t map;
   92         int paging;
   93         struct thread *td;
   94 
   95         totalp = &total;
   96         bzero(totalp, sizeof *totalp);
   97         /*
   98          * Mark all objects as inactive.
   99          */
  100         GIANT_REQUIRED;
  101         mtx_lock(&vm_object_list_mtx);
  102         TAILQ_FOREACH(object, &vm_object_list, object_list) {
  103                 VM_OBJECT_LOCK(object);
  104                 vm_object_clear_flag(object, OBJ_ACTIVE);
  105                 VM_OBJECT_UNLOCK(object);
  106         }
  107         mtx_unlock(&vm_object_list_mtx);
  108         /*
  109          * Calculate process statistics.
  110          */
  111         sx_slock(&allproc_lock);
  112         FOREACH_PROC_IN_SYSTEM(p) {
  113                 if (p->p_flag & P_SYSTEM)
  114                         continue;
  115                 mtx_lock_spin(&sched_lock);
  116                 switch (p->p_state) {
  117                 case PRS_NEW:
  118                         mtx_unlock_spin(&sched_lock);
  119                         continue;
  120                         break;
  121                 default:
  122                         FOREACH_THREAD_IN_PROC(p, td) {
  123                                 /* Need new statistics  XXX */
  124                                 switch (td->td_state) {
  125                                 case TDS_INHIBITED:
  126                                         if (TD_ON_LOCK(td) ||
  127                                             (td->td_inhibitors ==
  128                                             TDI_SWAPPED)) {
  129                                                 totalp->t_sw++;
  130                                         } else if (TD_IS_SLEEPING(td) ||
  131                                            TD_AWAITING_INTR(td) ||
  132                                            TD_IS_SUSPENDED(td)) {
  133                                                 if (td->td_priority <= PZERO)
  134                                                         totalp->t_dw++;
  135                                                 else
  136                                                         totalp->t_sl++;
  137                                         }
  138                                         break;
  139 
  140                                 case TDS_CAN_RUN:
  141                                         totalp->t_sw++;
  142                                         break;
  143                                 case TDS_RUNQ:
  144                                 case TDS_RUNNING:
  145                                         totalp->t_rq++;
  146                                         continue;
  147                                 default:
  148                                         break;
  149                                 }
  150                         }
  151                 }
  152                 mtx_unlock_spin(&sched_lock);
  153                 /*
  154                  * Note active objects.
  155                  */
  156                 paging = 0;
  157                 map = &p->p_vmspace->vm_map;
  158                 vm_map_lock_read(map);
  159                 for (entry = map->header.next;
  160                     entry != &map->header; entry = entry->next) {
  161                         if ((entry->eflags & MAP_ENTRY_IS_SUB_MAP) ||
  162                             (object = entry->object.vm_object) == NULL)
  163                                 continue;
  164                         VM_OBJECT_LOCK(object);
  165                         vm_object_set_flag(object, OBJ_ACTIVE);
  166                         paging |= object->paging_in_progress;
  167                         VM_OBJECT_UNLOCK(object);
  168                 }
  169                 vm_map_unlock_read(map);
  170                 if (paging)
  171                         totalp->t_pw++;
  172         }
  173         sx_sunlock(&allproc_lock);
  174         /*
  175          * Calculate object memory usage statistics.
  176          */
  177         mtx_lock(&vm_object_list_mtx);
  178         TAILQ_FOREACH(object, &vm_object_list, object_list) {
  179                 VM_OBJECT_LOCK(object);
  180                 /*
  181                  * devices, like /dev/mem, will badly skew our totals
  182                  */
  183                 if (object->type == OBJT_DEVICE) {
  184                         VM_OBJECT_UNLOCK(object);
  185                         continue;
  186                 }
  187                 totalp->t_vm += object->size;
  188                 totalp->t_rm += object->resident_page_count;
  189                 if (object->flags & OBJ_ACTIVE) {
  190                         totalp->t_avm += object->size;
  191                         totalp->t_arm += object->resident_page_count;
  192                 }
  193                 if (object->shadow_count > 1) {
  194                         /* shared object */
  195                         totalp->t_vmshr += object->size;
  196                         totalp->t_rmshr += object->resident_page_count;
  197                         if (object->flags & OBJ_ACTIVE) {
  198                                 totalp->t_avmshr += object->size;
  199                                 totalp->t_armshr += object->resident_page_count;
  200                         }
  201                 }
  202                 VM_OBJECT_UNLOCK(object);
  203         }
  204         mtx_unlock(&vm_object_list_mtx);
  205         totalp->t_free = cnt.v_free_count + cnt.v_cache_count;
  206         return (sysctl_handle_opaque(oidp, totalp, sizeof total, req));
  207 }
  208 
  209 /*
  210  * vcnt() -     accumulate statistics from all cpus and the global cnt
  211  *              structure.
  212  *
  213  *      The vmmeter structure is now per-cpu as well as global.  Those
  214  *      statistics which can be kept on a per-cpu basis (to avoid cache
  215  *      stalls between cpus) can be moved to the per-cpu vmmeter.  Remaining
  216  *      statistics, such as v_free_reserved, are left in the global
  217  *      structure.
  218  *
  219  * (sysctl_oid *oidp, void *arg1, int arg2, struct sysctl_req *req)
  220  */
  221 static int
  222 vcnt(SYSCTL_HANDLER_ARGS)
  223 {
  224         int error = 0;
  225         int count = *(int *)arg1;
  226 #ifdef SMP
  227         int i;
  228         int offset = (char *)arg1 - (char *)&cnt;
  229 
  230         for (i = 0; i < mp_ncpus; ++i) {
  231                 struct pcpu *pcpu = pcpu_find(i);
  232                 count += *(int *)((char *)&pcpu->pc_cnt + offset);
  233         }
  234 #else
  235         int offset = (char *)arg1 - (char *)&cnt;
  236         count += *(int *)((char *)PCPU_PTR(cnt) + offset);
  237 #endif
  238         error = SYSCTL_OUT(req, &count, sizeof(int));
  239         return(error);
  240 }
  241 
  242 SYSCTL_PROC(_vm, VM_TOTAL, vmtotal, CTLTYPE_OPAQUE|CTLFLAG_RD,
  243     0, sizeof(struct vmtotal), vmtotal, "S,vmtotal", 
  244     "System virtual memory statistics");
  245 SYSCTL_NODE(_vm, OID_AUTO, stats, CTLFLAG_RW, 0, "VM meter stats");
  246 SYSCTL_NODE(_vm_stats, OID_AUTO, sys, CTLFLAG_RW, 0, "VM meter sys stats");
  247 SYSCTL_NODE(_vm_stats, OID_AUTO, vm, CTLFLAG_RW, 0, "VM meter vm stats");
  248 SYSCTL_NODE(_vm_stats, OID_AUTO, misc, CTLFLAG_RW, 0, "VM meter misc stats");
  249 
  250 SYSCTL_PROC(_vm_stats_sys, OID_AUTO, v_swtch, CTLTYPE_UINT|CTLFLAG_RD,
  251         &cnt.v_swtch, 0, vcnt, "IU", "Context switches");
  252 SYSCTL_PROC(_vm_stats_sys, OID_AUTO, v_trap, CTLTYPE_UINT|CTLFLAG_RD,
  253         &cnt.v_trap, 0, vcnt, "IU", "Traps");
  254 SYSCTL_PROC(_vm_stats_sys, OID_AUTO, v_syscall, CTLTYPE_UINT|CTLFLAG_RD,
  255         &cnt.v_syscall, 0, vcnt, "IU", "Syscalls");
  256 SYSCTL_PROC(_vm_stats_sys, OID_AUTO, v_intr, CTLTYPE_UINT|CTLFLAG_RD,
  257         &cnt.v_intr, 0, vcnt, "IU", "Hardware interrupts");
  258 SYSCTL_PROC(_vm_stats_sys, OID_AUTO, v_soft, CTLTYPE_UINT|CTLFLAG_RD,
  259         &cnt.v_soft, 0, vcnt, "IU", "Software interrupts");
  260 SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_vm_faults, CTLTYPE_UINT|CTLFLAG_RD,
  261         &cnt.v_vm_faults, 0, vcnt, "IU", "VM faults");
  262 SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_cow_faults, CTLTYPE_UINT|CTLFLAG_RD,
  263         &cnt.v_cow_faults, 0, vcnt, "IU", "COW faults");
  264 SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_cow_optim, CTLTYPE_UINT|CTLFLAG_RD,
  265         &cnt.v_cow_optim, 0, vcnt, "IU", "Optimized COW faults");
  266 SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_zfod, CTLTYPE_UINT|CTLFLAG_RD,
  267         &cnt.v_zfod, 0, vcnt, "IU", "Zero fill");
  268 SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_ozfod, CTLTYPE_UINT|CTLFLAG_RD,
  269         &cnt.v_ozfod, 0, vcnt, "IU", "Optimized zero fill");
  270 SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_swapin, CTLTYPE_UINT|CTLFLAG_RD,
  271         &cnt.v_swapin, 0, vcnt, "IU", "Swapin operations");
  272 SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_swapout, CTLTYPE_UINT|CTLFLAG_RD,
  273         &cnt.v_swapout, 0, vcnt, "IU", "Swapout operations");
  274 SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_swappgsin, CTLTYPE_UINT|CTLFLAG_RD,
  275         &cnt.v_swappgsin, 0, vcnt, "IU", "Swapin pages");
  276 SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_swappgsout, CTLTYPE_UINT|CTLFLAG_RD,
  277         &cnt.v_swappgsout, 0, vcnt, "IU", "Swapout pages");
  278 SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_vnodein, CTLTYPE_UINT|CTLFLAG_RD,
  279         &cnt.v_vnodein, 0, vcnt, "IU", "Vnodein operations");
  280 SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_vnodeout, CTLTYPE_UINT|CTLFLAG_RD,
  281         &cnt.v_vnodeout, 0, vcnt, "IU", "Vnodeout operations");
  282 SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_vnodepgsin, CTLTYPE_UINT|CTLFLAG_RD,
  283         &cnt.v_vnodepgsin, 0, vcnt, "IU", "Vnodein pages");
  284 SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_vnodepgsout, CTLTYPE_UINT|CTLFLAG_RD,
  285         &cnt.v_vnodepgsout, 0, vcnt, "IU", "Vnodeout pages");
  286 SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_intrans, CTLTYPE_UINT|CTLFLAG_RD,
  287         &cnt.v_intrans, 0, vcnt, "IU", "In transit page blocking");
  288 SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_reactivated, CTLTYPE_UINT|CTLFLAG_RD,
  289         &cnt.v_reactivated, 0, vcnt, "IU", "Reactivated pages");
  290 SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_pdwakeups, CTLTYPE_UINT|CTLFLAG_RD,
  291         &cnt.v_pdwakeups, 0, vcnt, "IU", "Pagedaemon wakeups");
  292 SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_pdpages, CTLTYPE_UINT|CTLFLAG_RD,
  293         &cnt.v_pdpages, 0, vcnt, "IU", "Pagedaemon page scans");
  294 SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_dfree, CTLTYPE_UINT|CTLFLAG_RD,
  295         &cnt.v_dfree, 0, vcnt, "IU", "");
  296 SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_pfree, CTLTYPE_UINT|CTLFLAG_RD,
  297         &cnt.v_pfree, 0, vcnt, "IU", "");
  298 SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_tfree, CTLTYPE_UINT|CTLFLAG_RD,
  299         &cnt.v_tfree, 0, vcnt, "IU", "");
  300 SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_page_size, CTLTYPE_UINT|CTLFLAG_RD,
  301         &cnt.v_page_size, 0, vcnt, "IU", "");
  302 SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_page_count, CTLTYPE_UINT|CTLFLAG_RD,
  303         &cnt.v_page_count, 0, vcnt, "IU", "");
  304 SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_free_reserved, CTLTYPE_UINT|CTLFLAG_RD,
  305         &cnt.v_free_reserved, 0, vcnt, "IU", "");
  306 SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_free_target, CTLTYPE_UINT|CTLFLAG_RD,
  307         &cnt.v_free_target, 0, vcnt, "IU", "");
  308 SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_free_min, CTLTYPE_UINT|CTLFLAG_RD,
  309         &cnt.v_free_min, 0, vcnt, "IU", "");
  310 SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_free_count, CTLTYPE_UINT|CTLFLAG_RD,
  311         &cnt.v_free_count, 0, vcnt, "IU", "");
  312 SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_wire_count, CTLTYPE_UINT|CTLFLAG_RD,
  313         &cnt.v_wire_count, 0, vcnt, "IU", "");
  314 SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_active_count, CTLTYPE_UINT|CTLFLAG_RD,
  315         &cnt.v_active_count, 0, vcnt, "IU", "");
  316 SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_inactive_target, CTLTYPE_UINT|CTLFLAG_RD,
  317         &cnt.v_inactive_target, 0, vcnt, "IU", "");
  318 SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_inactive_count, CTLTYPE_UINT|CTLFLAG_RD,
  319         &cnt.v_inactive_count, 0, vcnt, "IU", "");
  320 SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_cache_count, CTLTYPE_UINT|CTLFLAG_RD,
  321         &cnt.v_cache_count, 0, vcnt, "IU", "");
  322 SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_cache_min, CTLTYPE_UINT|CTLFLAG_RD,
  323         &cnt.v_cache_min, 0, vcnt, "IU", "");
  324 SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_cache_max, CTLTYPE_UINT|CTLFLAG_RD,
  325         &cnt.v_cache_max, 0, vcnt, "IU", "");
  326 SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_pageout_free_min, CTLTYPE_UINT|CTLFLAG_RD,
  327         &cnt.v_pageout_free_min, 0, vcnt, "IU", "");
  328 SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_interrupt_free_min, CTLTYPE_UINT|CTLFLAG_RD,
  329         &cnt.v_interrupt_free_min, 0, vcnt, "IU", "");
  330 SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_forks, CTLTYPE_UINT|CTLFLAG_RD,
  331         &cnt.v_forks, 0, vcnt, "IU", "Number of fork() calls");
  332 SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_vforks, CTLTYPE_UINT|CTLFLAG_RD,
  333         &cnt.v_vforks, 0, vcnt, "IU", "Number of vfork() calls");
  334 SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_rforks, CTLTYPE_UINT|CTLFLAG_RD,
  335         &cnt.v_rforks, 0, vcnt, "IU", "Number of rfork() calls");
  336 SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_kthreads, CTLTYPE_UINT|CTLFLAG_RD,
  337         &cnt.v_kthreads, 0, vcnt, "IU", "Number of fork() calls by kernel");
  338 SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_forkpages, CTLTYPE_UINT|CTLFLAG_RD,
  339         &cnt.v_forkpages, 0, vcnt, "IU", "VM pages affected by fork()");
  340 SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_vforkpages, CTLTYPE_UINT|CTLFLAG_RD,
  341         &cnt.v_vforkpages, 0, vcnt, "IU", "VM pages affected by vfork()");
  342 SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_rforkpages, CTLTYPE_UINT|CTLFLAG_RD,
  343         &cnt.v_rforkpages, 0, vcnt, "IU", "VM pages affected by rfork()");
  344 SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_kthreadpages, CTLTYPE_UINT|CTLFLAG_RD,
  345         &cnt.v_kthreadpages, 0, vcnt, "IU", "VM pages affected by fork() by kernel");
  346 
  347 SYSCTL_INT(_vm_stats_misc, OID_AUTO,
  348         zero_page_count, CTLFLAG_RD, &vm_page_zero_count, 0, "");
  349 #if 0
  350 SYSCTL_INT(_vm_stats_misc, OID_AUTO,
  351         page_mask, CTLFLAG_RD, &page_mask, 0, "");
  352 SYSCTL_INT(_vm_stats_misc, OID_AUTO,
  353         page_shift, CTLFLAG_RD, &page_shift, 0, "");
  354 SYSCTL_INT(_vm_stats_misc, OID_AUTO,
  355         first_page, CTLFLAG_RD, &first_page, 0, "");
  356 SYSCTL_INT(_vm_stats_misc, OID_AUTO,
  357         last_page, CTLFLAG_RD, &last_page, 0, "");
  358 #endif

Cache object: 073a6a2cbd5e11f791c692e603dfbc79


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.