vm_meter.c (134747) | vm_meter.c (136404) |
---|---|
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 --- 16 unchanged lines hidden (view full) --- 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * @(#)vm_meter.c 8.4 (Berkeley) 1/4/94 30 */ 31 32#include <sys/cdefs.h> | 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 --- 16 unchanged lines hidden (view full) --- 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * @(#)vm_meter.c 8.4 (Berkeley) 1/4/94 30 */ 31 32#include <sys/cdefs.h> |
33__FBSDID("$FreeBSD: head/sys/vm/vm_meter.c 134747 2004-09-04 05:51:54Z alc $"); | 33__FBSDID("$FreeBSD: head/sys/vm/vm_meter.c 136404 2004-10-11 22:04:16Z peter $"); |
34 35#include <sys/param.h> 36#include <sys/systm.h> 37#include <sys/kernel.h> 38#include <sys/lock.h> 39#include <sys/mutex.h> 40#include <sys/proc.h> 41#include <sys/resource.h> --- 38 unchanged lines hidden (view full) --- 80 CTLFLAG_RW, &cnt.v_cache_min, 0, ""); 81SYSCTL_UINT(_vm, VM_V_CACHE_MAX, v_cache_max, 82 CTLFLAG_RW, &cnt.v_cache_max, 0, ""); 83SYSCTL_UINT(_vm, VM_V_PAGEOUT_FREE_MIN, v_pageout_free_min, 84 CTLFLAG_RW, &cnt.v_pageout_free_min, 0, ""); 85SYSCTL_UINT(_vm, OID_AUTO, v_free_severe, 86 CTLFLAG_RW, &cnt.v_free_severe, 0, ""); 87 | 34 35#include <sys/param.h> 36#include <sys/systm.h> 37#include <sys/kernel.h> 38#include <sys/lock.h> 39#include <sys/mutex.h> 40#include <sys/proc.h> 41#include <sys/resource.h> --- 38 unchanged lines hidden (view full) --- 80 CTLFLAG_RW, &cnt.v_cache_min, 0, ""); 81SYSCTL_UINT(_vm, VM_V_CACHE_MAX, v_cache_max, 82 CTLFLAG_RW, &cnt.v_cache_max, 0, ""); 83SYSCTL_UINT(_vm, VM_V_PAGEOUT_FREE_MIN, v_pageout_free_min, 84 CTLFLAG_RW, &cnt.v_pageout_free_min, 0, ""); 85SYSCTL_UINT(_vm, OID_AUTO, v_free_severe, 86 CTLFLAG_RW, &cnt.v_free_severe, 0, ""); 87 |
88SYSCTL_STRUCT(_vm, VM_LOADAVG, loadavg, CTLFLAG_RD, 89 &averunnable, loadavg, "Machine loadaverage history"); | 88static int 89sysctl_vm_loadavg(SYSCTL_HANDLER_ARGS) 90{ 91#ifdef SCTL_MASK32 92 u_int32_t la[4]; |
90 | 93 |
94 if (req->flags & SCTL_MASK32) { 95 la[0] = averunnable.ldavg[0]; 96 la[1] = averunnable.ldavg[1]; 97 la[2] = averunnable.ldavg[2]; 98 la[3] = averunnable.fscale; 99 return SYSCTL_OUT(req, la, sizeof(la)); 100 } else 101#endif 102 return SYSCTL_OUT(req, &averunnable, sizeof(averunnable)); 103} 104SYSCTL_PROC(_vm, VM_LOADAVG, loadavg, CTLTYPE_STRUCT|CTLFLAG_RD, 105 NULL, 0, sysctl_vm_loadavg, "S,loadavg", "Machine loadaverage history"); 106 |
|
91static int 92vmtotal(SYSCTL_HANDLER_ARGS) 93{ 94/* XXXKSE almost completely broken */ 95 struct proc *p; 96 struct vmtotal total, *totalp; 97 vm_map_entry_t entry; 98 vm_object_t object; --- 278 unchanged lines hidden --- | 107static int 108vmtotal(SYSCTL_HANDLER_ARGS) 109{ 110/* XXXKSE almost completely broken */ 111 struct proc *p; 112 struct vmtotal total, *totalp; 113 vm_map_entry_t entry; 114 vm_object_t object; --- 278 unchanged lines hidden --- |