-/* $OpenBSD: uvm_km.c,v 1.84 2010/07/15 00:14:17 tedu Exp $ */
+/* $OpenBSD: uvm_km.c,v 1.85 2010/07/22 17:31:39 thib Exp $ */
/* $NetBSD: uvm_km.c,v 1.42 2001/01/14 02:10:01 thorpej Exp $ */
/*
return uvm_km_valloc_prefer_wait(map, size, UVM_UNKNOWN_OFFSET);
}
-int uvm_km_pages_free; /* number of pages currently on free list */
-
#if defined(__HAVE_PMAP_DIRECT)
/*
* uvm_km_page allocator, __HAVE_PMAP_DIRECT arch
-/* $OpenBSD: uvm_meter.c,v 1.28 2009/06/17 00:13:59 oga Exp $ */
+/* $OpenBSD: uvm_meter.c,v 1.29 2010/07/22 17:31:39 thib Exp $ */
/* $NetBSD: uvm_meter.c,v 1.21 2001/07/14 06:36:03 matt Exp $ */
/*
struct vmtotal vmtotals;
int rv, t;
struct _ps_strings _ps = { PS_STRINGS };
- extern int uvm_km_pages_free;
switch (name[0]) {
case VM_SWAPENCRYPT:
case VM_USPACE:
return (sysctl_rdint(oldp, oldlenp, newp, USPACE));
- case VM_KMPAGESFREE:
- return (sysctl_rdint(oldp, oldlenp, newp, uvm_km_pages_free));
-
default:
return (EOPNOTSUPP);
}
-/* $OpenBSD: uvm_param.h,v 1.14 2008/02/17 20:33:47 kettenis Exp $ */
+/* $OpenBSD: uvm_param.h,v 1.15 2010/07/22 17:31:39 thib Exp $ */
/* $NetBSD: uvm_param.h,v 1.5 2001/03/09 01:02:12 chs Exp $ */
/*
#define VM_VNODEMIN 9
#define VM_MAXSLP 10
#define VM_USPACE 11
-#define VM_KMPAGESFREE 12
-#define VM_MAXID 13 /* number of valid vm ids */
+#define VM_MAXID 12 /* number of valid vm ids */
#define CTL_VM_NAMES { \
{ 0, 0 }, \
{ "vnodemin", CTLTYPE_INT }, \
{ "maxslp", CTLTYPE_INT }, \
{ "uspace", CTLTYPE_INT }, \
- { "kmpagesfree", CTLTYPE_INT }, \
}
struct _ps_strings {
/* $NetBSD: vmstat.c,v 1.29.4.1 1996/06/05 00:21:05 cgd Exp $ */
-/* $OpenBSD: vmstat.c,v 1.115 2010/07/20 19:43:19 lum Exp $ */
+/* $OpenBSD: vmstat.c,v 1.116 2010/07/22 17:31:39 thib Exp $ */
/*
* Copyright (c) 1980, 1986, 1991, 1993
inuse /= 1024;
total /= 1024;
- if (nlistf == NULL && memf == NULL) {
- int mib[] = { CTL_VM, VM_KMPAGESFREE };
- size_t size = sizeof(kmfp);
-
- if (sysctl(mib, 2, &kmfp, &size, NULL, 0) < 0) {
- warn("could not read uvm.kmpagesfree");
- return;
- }
- } else {
- kread(X_KMPAGESFREE, &kmfp, sizeof(kmfp));
- }
- total += kmfp * (getpagesize() / 1024);
printf("\nIn use %ldK, total allocated %ldK; utilization %.1f%%\n",
inuse, total, (double)(100 * inuse) / total);
}