Deleted Added
full compact
vm_meter.c (34924) vm_meter.c (34961)
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.23 1997/11/24 15:15:33 bde Exp $
34 * $Id: vm_meter.c,v 1.24 1998/03/28 10:33:27 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/resource.h>
42#include <sys/vmmeter.h>

--- 49 unchanged lines hidden (view full) ---

92 avg->ldavg[i] = (cexp[i] * avg->ldavg[i] +
93 nrun * FSCALE * (FSCALE - cexp[i])) >> FSHIFT;
94}
95
96void
97vmmeter()
98{
99
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/resource.h>
42#include <sys/vmmeter.h>

--- 49 unchanged lines hidden (view full) ---

92 avg->ldavg[i] = (cexp[i] * avg->ldavg[i] +
93 nrun * FSCALE * (FSCALE - cexp[i])) >> FSHIFT;
94}
95
96void
97vmmeter()
98{
99
100 if (time.tv_sec % 5 == 0)
100 if (time_second % 5 == 0)
101 loadav(&averunnable);
102 if (proc0.p_slptime > maxslp / 2)
103 wakeup(&proc0);
104}
105
106SYSCTL_INT(_vm, VM_V_FREE_MIN, v_free_min,
107 CTLFLAG_RW, &cnt.v_free_min, 0, "");
108SYSCTL_INT(_vm, VM_V_FREE_TARGET, v_free_target,

--- 109 unchanged lines hidden ---
101 loadav(&averunnable);
102 if (proc0.p_slptime > maxslp / 2)
103 wakeup(&proc0);
104}
105
106SYSCTL_INT(_vm, VM_V_FREE_MIN, v_free_min,
107 CTLFLAG_RW, &cnt.v_free_min, 0, "");
108SYSCTL_INT(_vm, VM_V_FREE_TARGET, v_free_target,

--- 109 unchanged lines hidden ---