From 73eee1b812d463f59e860b423ccfec94ed9d5c2a Mon Sep 17 00:00:00 2001 From: thib Date: Thu, 22 Jul 2010 17:31:39 +0000 Subject: [PATCH] Remove the VM_KMPAGESFREE sysctl. After the pmemrange changes it was returing a constant 0, changing to cope with those changes makes less sense then just removing as it provides the user with no usefull information. sthen@ grepped the port's tree for me and found not hits, thanks! OK deraadt@, matthew@ --- sys/uvm/uvm_km.c | 4 +--- sys/uvm/uvm_meter.c | 6 +----- sys/uvm/uvm_param.h | 6 ++---- usr.bin/vmstat/vmstat.c | 14 +------------- 4 files changed, 5 insertions(+), 25 deletions(-) diff --git a/sys/uvm/uvm_km.c b/sys/uvm/uvm_km.c index aee736d2e66..00a6e23343d 100644 --- a/sys/uvm/uvm_km.c +++ b/sys/uvm/uvm_km.c @@ -1,4 +1,4 @@ -/* $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 $ */ /* @@ -676,8 +676,6 @@ uvm_km_valloc_wait(struct vm_map *map, vsize_t size) 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 diff --git a/sys/uvm/uvm_meter.c b/sys/uvm/uvm_meter.c index 689ea32b610..3b7a162b149 100644 --- a/sys/uvm/uvm_meter.c +++ b/sys/uvm/uvm_meter.c @@ -1,4 +1,4 @@ -/* $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 $ */ /* @@ -149,7 +149,6 @@ uvm_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp, struct vmtotal vmtotals; int rv, t; struct _ps_strings _ps = { PS_STRINGS }; - extern int uvm_km_pages_free; switch (name[0]) { case VM_SWAPENCRYPT: @@ -231,9 +230,6 @@ uvm_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp, 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); } diff --git a/sys/uvm/uvm_param.h b/sys/uvm/uvm_param.h index 392ffaf72d6..e54bb1d6e25 100644 --- a/sys/uvm/uvm_param.h +++ b/sys/uvm/uvm_param.h @@ -1,4 +1,4 @@ -/* $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 $ */ /* @@ -112,8 +112,7 @@ typedef int boolean_t; #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 }, \ @@ -128,7 +127,6 @@ typedef int boolean_t; { "vnodemin", CTLTYPE_INT }, \ { "maxslp", CTLTYPE_INT }, \ { "uspace", CTLTYPE_INT }, \ - { "kmpagesfree", CTLTYPE_INT }, \ } struct _ps_strings { diff --git a/usr.bin/vmstat/vmstat.c b/usr.bin/vmstat/vmstat.c index c6d968e2362..0246d749120 100644 --- a/usr.bin/vmstat/vmstat.c +++ b/usr.bin/vmstat/vmstat.c @@ -1,5 +1,5 @@ /* $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 @@ -1031,18 +1031,6 @@ dopool_sysctl(void) 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); } -- 2.20.1