-/* $OpenBSD: fpu.c,v 1.28 2014/03/29 18:09:28 guenther Exp $ */
+/* $OpenBSD: fpu.c,v 1.29 2014/05/06 11:50:13 mpi Exp $ */
/* $NetBSD: fpu.c,v 1.1 2003/04/26 18:39:28 fvdl Exp $ */
/*-
#include <sys/user.h>
#include <sys/ioctl.h>
#include <sys/device.h>
-#include <sys/vmmeter.h>
#include <sys/signalvar.h>
#include <uvm/uvm_extern.h>
-/* $OpenBSD: kern_fork.c,v 1.165 2014/05/04 05:03:26 guenther Exp $ */
+/* $OpenBSD: kern_fork.c,v 1.166 2014/05/06 11:50:14 mpi Exp $ */
/* $NetBSD: kern_fork.c,v 1.29 1996/02/09 18:59:34 christos Exp $ */
/*
#include <sys/resourcevar.h>
#include <sys/signalvar.h>
#include <sys/vnode.h>
+#include <sys/vmmeter.h>
#include <sys/file.h>
#include <sys/acct.h>
#include <sys/ktrace.h>
-/* $OpenBSD: procfs_vfsops.c,v 1.29 2013/04/15 15:32:19 jsing Exp $ */
+/* $OpenBSD: procfs_vfsops.c,v 1.30 2014/05/06 11:50:14 mpi Exp $ */
/* $NetBSD: procfs_vfsops.c,v 1.25 1996/02/09 22:40:53 christos Exp $ */
/*
int
procfs_statfs(struct mount *mp, struct statfs *sbp, struct proc *p)
{
- struct vmtotal vmtotals;
-
- uvm_total(&vmtotals);
sbp->f_bsize = PAGE_SIZE;
sbp->f_iosize = PAGE_SIZE;
- sbp->f_blocks = vmtotals.t_vm;
- sbp->f_bfree = vmtotals.t_vm - vmtotals.t_avm;
+ sbp->f_blocks = uvmexp.npages - uvmexp.free + uvmexp.swpginuse;
+ sbp->f_bfree = uvmexp.npages - uvmexp.free - uvmexp.active;
sbp->f_bavail = 0;
sbp->f_files = maxprocess; /* approx */
sbp->f_ffree = maxprocess - nprocesses; /* approx */
-/* $OpenBSD: uvm_extern.h,v 1.113 2014/05/03 22:44:36 guenther Exp $ */
+/* $OpenBSD: uvm_extern.h,v 1.114 2014/05/06 11:50:14 mpi Exp $ */
/* $NetBSD: uvm_extern.h,v 1.57 2001/03/09 01:02:12 chs Exp $ */
/*
struct proc;
struct pmap;
struct vmspace;
-struct vmtotal;
struct mount;
struct vnode;
struct core;
void uvm_meter(void);
int uvm_sysctl(int *, u_int, void *, size_t *,
void *, size_t, struct proc *);
-void uvm_total(struct vmtotal *);
/* uvm_mmap.c */
int uvm_mmap(vm_map_t, vaddr_t *, vsize_t,
-/* $OpenBSD: uvm_meter.c,v 1.31 2014/04/13 23:14:15 tedu Exp $ */
+/* $OpenBSD: uvm_meter.c,v 1.32 2014/05/06 11:50:14 mpi Exp $ */
/* $NetBSD: uvm_meter.c,v 1.21 2001/07/14 06:36:03 matt Exp $ */
/*
#include <sys/proc.h>
#include <sys/systm.h>
#include <sys/kernel.h>
-#include <uvm/uvm_extern.h>
+#include <sys/vmmeter.h>
#include <sys/sysctl.h>
#include <sys/exec.h>
0.9944598480048967 * FSCALE, /* exp(-1/180) */
};
-/*
- * prototypes
- */
+
static void uvm_loadav(struct loadavg *);
+void uvm_total(struct vmtotal *);
/*
* uvm_meter: calculate load average and wake up the swapper (if needed)