vm_meter.c (12726) | vm_meter.c (12820) |
---|---|
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 --- 17 unchanged lines hidden (view full) --- 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 | 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 --- 17 unchanged lines hidden (view full) --- 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 * $Id: vm_meter.c,v 1.11 1995/12/07 12:48:18 davidg Exp $ | 34 * $Id: vm_meter.c,v 1.12 1995/12/10 14:52:10 bde Exp $ |
35 */ 36 37#include <sys/param.h> 38#include <sys/proc.h> 39#include <sys/systm.h> 40#include <sys/kernel.h> 41#include <sys/vmmeter.h> 42#include <sys/queue.h> --- 8 unchanged lines hidden (view full) --- 51#include <vm/vm_object.h> 52#include <sys/sysctl.h> 53 54struct loadavg averunnable = 55 { {0, 0, 0}, FSCALE }; /* load average, of runnable procs */ 56 57struct vmmeter cnt; 58 | 35 */ 36 37#include <sys/param.h> 38#include <sys/proc.h> 39#include <sys/systm.h> 40#include <sys/kernel.h> 41#include <sys/vmmeter.h> 42#include <sys/queue.h> --- 8 unchanged lines hidden (view full) --- 51#include <vm/vm_object.h> 52#include <sys/sysctl.h> 53 54struct loadavg averunnable = 55 { {0, 0, 0}, FSCALE }; /* load average, of runnable procs */ 56 57struct vmmeter cnt; 58 |
59int maxslp = MAXSLP; | 59static int maxslp = MAXSLP; |
60 61/* 62 * Constants for averages over 1, 5, and 15 minutes 63 * when sampling at 5 second intervals. 64 */ | 60 61/* 62 * Constants for averages over 1, 5, and 15 minutes 63 * when sampling at 5 second intervals. 64 */ |
65fixpt_t cexp[3] = { | 65static fixpt_t cexp[3] = { |
66 0.9200444146293232 * FSCALE, /* exp(-1/12) */ 67 0.9834714538216174 * FSCALE, /* exp(-1/60) */ 68 0.9944598480048967 * FSCALE, /* exp(-1/180) */ 69}; 70 71/* 72 * Compute a tenex style load average of a quantity on 73 * 1, 5 and 15 minute intervals. --- 145 unchanged lines hidden --- | 66 0.9200444146293232 * FSCALE, /* exp(-1/12) */ 67 0.9834714538216174 * FSCALE, /* exp(-1/60) */ 68 0.9944598480048967 * FSCALE, /* exp(-1/180) */ 69}; 70 71/* 72 * Compute a tenex style load average of a quantity on 73 * 1, 5 and 15 minute intervals. --- 145 unchanged lines hidden --- |