summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorad <ad@NetBSD.org>2019-12-31 13:07:09 +0000
committerad <ad@NetBSD.org>2019-12-31 13:07:09 +0000
commitc5342c95ffad4a4ef74daaefd59a1fcf9e9eca9d (patch)
tree3699684f0e8f20402d5a66161ba1d761ab2dedb3 /sys
parentd9b5bc8cda9392365870f9652b187bad6e703350 (diff)
Rename uvm_free() -> uvm_availmem().
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/alpha/alpha/machdep.c6
-rw-r--r--sys/arch/atari/atari/machdep.c6
-rw-r--r--sys/arch/cesfic/cesfic/machdep.c6
-rw-r--r--sys/arch/emips/emips/machdep.c6
-rw-r--r--sys/arch/evbppc/explora/machdep.c6
-rw-r--r--sys/arch/evbppc/virtex/machdep.c6
-rw-r--r--sys/arch/evbppc/walnut/machdep.c6
-rw-r--r--sys/arch/ews4800mips/ews4800mips/machdep.c6
-rw-r--r--sys/arch/hp300/hp300/machdep.c6
-rw-r--r--sys/arch/hppa/hppa/machdep.c6
-rw-r--r--sys/arch/luna68k/luna68k/machdep.c6
-rw-r--r--sys/arch/mac68k/mac68k/machdep.c6
-rw-r--r--sys/arch/mips/mips/cpu_subr.c6
-rw-r--r--sys/arch/mvme68k/mvme68k/machdep.c6
-rw-r--r--sys/arch/news68k/news68k/machdep.c6
-rw-r--r--sys/arch/next68k/next68k/machdep.c6
-rw-r--r--sys/arch/powerpc/booke/booke_machdep.c6
-rw-r--r--sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c6
-rw-r--r--sys/arch/powerpc/oea/oea_machdep.c6
-rw-r--r--sys/arch/riscv/riscv/riscv_machdep.c4
-rw-r--r--sys/arch/sgimips/sgimips/machdep.c6
-rw-r--r--sys/arch/sh3/sh3/sh3_machdep.c6
-rw-r--r--sys/arch/sparc/sparc/machdep.c6
-rw-r--r--sys/arch/sparc64/sparc64/machdep.c6
-rw-r--r--sys/arch/sun2/sun2/machdep.c6
-rw-r--r--sys/arch/sun3/sun3/machdep.c6
-rw-r--r--sys/arch/sun3/sun3x/machdep.c6
-rw-r--r--sys/arch/vax/vax/machdep.c6
-rw-r--r--sys/arch/x68k/x68k/machdep.c6
-rw-r--r--sys/compat/linux/common/linux_misc.c6
-rw-r--r--sys/compat/linux32/common/linux32_sysinfo.c6
-rw-r--r--sys/dev/ccd.c6
-rw-r--r--sys/fs/tmpfs/tmpfs_mem.c6
-rw-r--r--sys/kern/init_main.c6
-rw-r--r--sys/kern/kern_module.c6
-rw-r--r--sys/kern/kern_proc.c6
-rw-r--r--sys/kern/vfs_bio.c6
-rw-r--r--sys/miscfs/procfs/procfs_linux.c6
-rw-r--r--sys/rump/librump/rumpkern/vm.c6
-rw-r--r--sys/ufs/chfs/chfs_subr.c4
-rw-r--r--sys/ufs/lfs/lfs_bio.c8
-rw-r--r--sys/uvm/uvm_extern.h4
-rw-r--r--sys/uvm/uvm_glue.c6
-rw-r--r--sys/uvm/uvm_meter.c10
-rw-r--r--sys/uvm/uvm_page.c12
-rw-r--r--sys/uvm/uvm_pdaemon.c23
-rw-r--r--sys/uvm/uvm_pdpolicy_clock.c6
-rw-r--r--sys/uvm/uvm_pglist.c10
-rw-r--r--sys/uvm/uvm_stat.c6
49 files changed, 162 insertions, 159 deletions
diff --git a/sys/arch/alpha/alpha/machdep.c b/sys/arch/alpha/alpha/machdep.c
index 755f0dd079c..8091e3be2ca 100644
--- a/sys/arch/alpha/alpha/machdep.c
+++ b/sys/arch/alpha/alpha/machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.356 2019/12/21 13:00:20 ad Exp $ */
+/* $NetBSD: machdep.c,v 1.357 2019/12/31 13:07:09 ad Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2019 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.356 2019/12/21 13:00:20 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.357 2019/12/31 13:07:09 ad Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -868,7 +868,7 @@ cpu_startup(void)
#if defined(DEBUG)
pmapdebug = opmapdebug;
#endif
- format_bytes(pbuf, sizeof(pbuf), ptoa(uvm_free()));
+ format_bytes(pbuf, sizeof(pbuf), ptoa(uvm_availmem()));
printf("avail memory = %s\n", pbuf);
#if 0
{
diff --git a/sys/arch/atari/atari/machdep.c b/sys/arch/atari/atari/machdep.c
index eba8793b9a8..25b83324467 100644
--- a/sys/arch/atari/atari/machdep.c
+++ b/sys/arch/atari/atari/machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.181 2019/12/21 13:00:21 ad Exp $ */
+/* $NetBSD: machdep.c,v 1.182 2019/12/31 13:07:09 ad Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.181 2019/12/21 13:00:21 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.182 2019/12/31 13:07:09 ad Exp $");
#include "opt_ddb.h"
#include "opt_compat_netbsd.h"
@@ -211,7 +211,7 @@ cpu_startup(void)
#ifdef DEBUG
pmapdebug = opmapdebug;
#endif
- format_bytes(pbuf, sizeof(pbuf), ptoa(uvm_free()));
+ format_bytes(pbuf, sizeof(pbuf), ptoa(uvm_availmem()));
printf("avail memory = %s\n", pbuf);
/*
diff --git a/sys/arch/cesfic/cesfic/machdep.c b/sys/arch/cesfic/cesfic/machdep.c
index 51c21a323b3..4628724582a 100644
--- a/sys/arch/cesfic/cesfic/machdep.c
+++ b/sys/arch/cesfic/cesfic/machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.69 2019/12/21 13:00:21 ad Exp $ */
+/* $NetBSD: machdep.c,v 1.70 2019/12/31 13:07:10 ad Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.69 2019/12/21 13:00:21 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.70 2019/12/31 13:07:10 ad Exp $");
#include "opt_bufcache.h"
#include "opt_ddb.h"
@@ -260,7 +260,7 @@ cpu_startup(void)
#ifdef DEBUG
pmapdebug = opmapdebug;
#endif
- printf("avail mem = %ld\n", ptoa(uvm_free()));
+ printf("avail mem = %ld\n", ptoa(uvm_availmem()));
}
/*
diff --git a/sys/arch/emips/emips/machdep.c b/sys/arch/emips/emips/machdep.c
index 637eaf50dd8..fa501751600 100644
--- a/sys/arch/emips/emips/machdep.c
+++ b/sys/arch/emips/emips/machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.14 2019/12/21 13:00:21 ad Exp $ */
+/* $NetBSD: machdep.c,v 1.15 2019/12/31 13:07:10 ad Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.14 2019/12/21 13:00:21 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.15 2019/12/31 13:07:10 ad Exp $");
#include "opt_ddb.h"
@@ -458,7 +458,7 @@ cpu_startup(void)
#ifdef DEBUG
pmapdebug = opmapdebug;
#endif
- format_bytes(pbuf, sizeof(pbuf), ptoa(uvm_free()));
+ format_bytes(pbuf, sizeof(pbuf), ptoa(uvm_availmem()));
printf("avail memory = %s\n", pbuf);
}
diff --git a/sys/arch/evbppc/explora/machdep.c b/sys/arch/evbppc/explora/machdep.c
index 0392103de4a..0ed8c608a53 100644
--- a/sys/arch/evbppc/explora/machdep.c
+++ b/sys/arch/evbppc/explora/machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.38 2019/12/21 13:00:21 ad Exp $ */
+/* $NetBSD: machdep.c,v 1.39 2019/12/31 13:07:10 ad Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.38 2019/12/21 13:00:21 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.39 2019/12/31 13:07:10 ad Exp $");
#include "opt_explora.h"
#include "opt_modular.h"
@@ -179,7 +179,7 @@ cpu_startup(void)
* pool pages.
*/
- format_bytes(pbuf, sizeof(pbuf), ptoa(uvm_free()));
+ format_bytes(pbuf, sizeof(pbuf), ptoa(uvm_availmem()));
printf("avail memory = %s\n", pbuf);
/*
diff --git a/sys/arch/evbppc/virtex/machdep.c b/sys/arch/evbppc/virtex/machdep.c
index bdd80d307c5..572b32d3fce 100644
--- a/sys/arch/evbppc/virtex/machdep.c
+++ b/sys/arch/evbppc/virtex/machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.23 2019/12/21 13:00:21 ad Exp $ */
+/* $NetBSD: machdep.c,v 1.24 2019/12/31 13:07:10 ad Exp $ */
/*
* Copyright (c) 2006 Jachym Holecek
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.23 2019/12/21 13:00:21 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.24 2019/12/31 13:07:10 ad Exp $");
#include "opt_compat_netbsd.h"
#include "opt_ddb.h"
@@ -202,7 +202,7 @@ cpu_startup(void)
* pool pages.
*/
- format_bytes(pbuf, sizeof(pbuf), ptoa(uvm_free()));
+ format_bytes(pbuf, sizeof(pbuf), ptoa(uvm_availmem()));
printf("avail memory = %s\n", pbuf);
/*
diff --git a/sys/arch/evbppc/walnut/machdep.c b/sys/arch/evbppc/walnut/machdep.c
index 7516bf4fc7f..030c3b9126c 100644
--- a/sys/arch/evbppc/walnut/machdep.c
+++ b/sys/arch/evbppc/walnut/machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.57 2019/12/21 13:00:21 ad Exp $ */
+/* $NetBSD: machdep.c,v 1.58 2019/12/31 13:07:10 ad Exp $ */
/*
* Copyright 2001, 2002 Wasabi Systems, Inc.
@@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.57 2019/12/21 13:00:21 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.58 2019/12/31 13:07:10 ad Exp $");
#include "opt_compat_netbsd.h"
#include "opt_ddb.h"
@@ -259,7 +259,7 @@ cpu_startup(void)
* pool pages.
*/
- format_bytes(pbuf, sizeof(pbuf), ptoa(uvm_free()));
+ format_bytes(pbuf, sizeof(pbuf), ptoa(uvm_availmem()));
printf("avail memory = %s\n", pbuf);
/*
diff --git a/sys/arch/ews4800mips/ews4800mips/machdep.c b/sys/arch/ews4800mips/ews4800mips/machdep.c
index 2a2bb6284dd..57f8126d867 100644
--- a/sys/arch/ews4800mips/ews4800mips/machdep.c
+++ b/sys/arch/ews4800mips/ews4800mips/machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.29 2019/12/21 13:00:21 ad Exp $ */
+/* $NetBSD: machdep.c,v 1.30 2019/12/31 13:07:10 ad Exp $ */
/*-
* Copyright (c) 2001, 2004, 2005 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.29 2019/12/21 13:00:21 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.30 2019/12/31 13:07:10 ad Exp $");
#include "opt_ddb.h"
@@ -230,7 +230,7 @@ cpu_startup(void)
* are allocated via the pool allocator, and we use KSEG to
* map those pages.)
*/
- format_bytes(pbuf, sizeof(pbuf), ptoa(uvm_free()));
+ format_bytes(pbuf, sizeof(pbuf), ptoa(uvm_availmem()));
printf("avail memory = %s\n", pbuf);
}
diff --git a/sys/arch/hp300/hp300/machdep.c b/sys/arch/hp300/hp300/machdep.c
index a18bfdb99a9..cb904c21965 100644
--- a/sys/arch/hp300/hp300/machdep.c
+++ b/sys/arch/hp300/hp300/machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.231 2019/12/21 13:00:21 ad Exp $ */
+/* $NetBSD: machdep.c,v 1.232 2019/12/31 13:07:10 ad Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.231 2019/12/21 13:00:21 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.232 2019/12/31 13:07:10 ad Exp $");
#include "opt_ddb.h"
#include "opt_compat_netbsd.h"
@@ -324,7 +324,7 @@ cpu_startup(void)
#ifdef DEBUG
pmapdebug = opmapdebug;
#endif
- format_bytes(pbuf, sizeof(pbuf), ptoa(uvm_free()));
+ format_bytes(pbuf, sizeof(pbuf), ptoa(uvm_availmem()));
printf("avail memory = %s\n", pbuf);
/*
diff --git a/sys/arch/hppa/hppa/machdep.c b/sys/arch/hppa/hppa/machdep.c
index a3d48fc81d7..bad44a44527 100644
--- a/sys/arch/hppa/hppa/machdep.c
+++ b/sys/arch/hppa/hppa/machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.11 2019/12/21 13:00:21 ad Exp $ */
+/* $NetBSD: machdep.c,v 1.12 2019/12/31 13:07:10 ad Exp $ */
/*-
* Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.11 2019/12/21 13:00:21 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.12 2019/12/31 13:07:10 ad Exp $");
#include "opt_cputype.h"
#include "opt_ddb.h"
@@ -943,7 +943,7 @@ cpu_startup(void)
#ifdef PMAPDEBUG
pmapdebug = opmapdebug;
#endif
- format_bytes(pbuf[0], sizeof(pbuf[0]), ptoa(uvm_free()));
+ format_bytes(pbuf[0], sizeof(pbuf[0]), ptoa(uvm_availmem()));
printf("avail mem = %s\n", pbuf[0]);
}
diff --git a/sys/arch/luna68k/luna68k/machdep.c b/sys/arch/luna68k/luna68k/machdep.c
index b2409fa2a35..b8f75499dcb 100644
--- a/sys/arch/luna68k/luna68k/machdep.c
+++ b/sys/arch/luna68k/luna68k/machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.104 2019/12/21 13:00:22 ad Exp $ */
+/* $NetBSD: machdep.c,v 1.105 2019/12/31 13:07:10 ad Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.104 2019/12/21 13:00:22 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.105 2019/12/31 13:07:10 ad Exp $");
#include "opt_ddb.h"
#include "opt_kgdb.h"
@@ -345,7 +345,7 @@ cpu_startup(void)
phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
VM_PHYS_SIZE, 0, false, NULL);
- format_bytes(pbuf, sizeof(pbuf), ptoa(uvm_free()));
+ format_bytes(pbuf, sizeof(pbuf), ptoa(uvm_availmem()));
printf("avail memory = %s\n", pbuf);
}
diff --git a/sys/arch/mac68k/mac68k/machdep.c b/sys/arch/mac68k/mac68k/machdep.c
index d61e34c2e0c..91006da1a13 100644
--- a/sys/arch/mac68k/mac68k/machdep.c
+++ b/sys/arch/mac68k/mac68k/machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.356 2019/12/21 13:00:22 ad Exp $ */
+/* $NetBSD: machdep.c,v 1.357 2019/12/31 13:07:11 ad Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -74,7 +74,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.356 2019/12/21 13:00:22 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.357 2019/12/31 13:07:11 ad Exp $");
#include "opt_adb.h"
#include "opt_copy_symtab.h"
@@ -414,7 +414,7 @@ cpu_startup(void)
phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
VM_PHYS_SIZE, 0, false, NULL);
- format_bytes(pbuf, sizeof(pbuf), ptoa(uvm_free()));
+ format_bytes(pbuf, sizeof(pbuf), ptoa(uvm_availmem()));
printf("avail memory = %s\n", pbuf);
/*
diff --git a/sys/arch/mips/mips/cpu_subr.c b/sys/arch/mips/mips/cpu_subr.c
index d3527d8b213..ec514f5d0f0 100644
--- a/sys/arch/mips/mips/cpu_subr.c
+++ b/sys/arch/mips/mips/cpu_subr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu_subr.c,v 1.43 2019/12/27 09:45:26 msaitoh Exp $ */
+/* $NetBSD: cpu_subr.c,v 1.44 2019/12/31 13:07:11 ad Exp $ */
/*-
* Copyright (c) 2010, 2019 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.43 2019/12/27 09:45:26 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.44 2019/12/31 13:07:11 ad Exp $");
#include "opt_cputype.h"
#include "opt_ddb.h"
@@ -337,7 +337,7 @@ cpu_startup_common(void)
* map those pages.)
*/
- format_bytes(pbuf, sizeof(pbuf), ptoa(uvm_free()));
+ format_bytes(pbuf, sizeof(pbuf), ptoa(uvm_availmem()));
printf("avail memory = %s\n", pbuf);
#if defined(__mips_n32)
diff --git a/sys/arch/mvme68k/mvme68k/machdep.c b/sys/arch/mvme68k/mvme68k/machdep.c
index bf5b9a6deb4..9e273a66ff4 100644
--- a/sys/arch/mvme68k/mvme68k/machdep.c
+++ b/sys/arch/mvme68k/mvme68k/machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.156 2019/12/21 13:00:22 ad Exp $ */
+/* $NetBSD: machdep.c,v 1.157 2019/12/31 13:07:11 ad Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.156 2019/12/21 13:00:22 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.157 2019/12/31 13:07:11 ad Exp $");
#include "opt_ddb.h"
#include "opt_m060sp.h"
@@ -474,7 +474,7 @@ cpu_startup(void)
#ifdef DEBUG
pmapdebug = opmapdebug;
#endif
- format_bytes(pbuf, sizeof(pbuf), ptoa(uvm_free()));
+ format_bytes(pbuf, sizeof(pbuf), ptoa(uvm_availmem()));
printf("avail memory = %s\n", pbuf);
/*
diff --git a/sys/arch/news68k/news68k/machdep.c b/sys/arch/news68k/news68k/machdep.c
index d73b3213c95..baa38b9735a 100644
--- a/sys/arch/news68k/news68k/machdep.c
+++ b/sys/arch/news68k/news68k/machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.105 2019/12/21 13:00:22 ad Exp $ */
+/* $NetBSD: machdep.c,v 1.106 2019/12/31 13:07:11 ad Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.105 2019/12/21 13:00:22 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.106 2019/12/31 13:07:11 ad Exp $");
#include "opt_ddb.h"
#include "opt_compat_netbsd.h"
@@ -237,7 +237,7 @@ cpu_startup(void)
#ifdef DEBUG
pmapdebug = opmapdebug;
#endif
- format_bytes(pbuf, sizeof(pbuf), ptoa(uvm_free()));
+ format_bytes(pbuf, sizeof(pbuf), ptoa(uvm_availmem()));
printf("avail memory = %s\n", pbuf);
/*
diff --git a/sys/arch/next68k/next68k/machdep.c b/sys/arch/next68k/next68k/machdep.c
index 682a292dfbb..dde0a5dd154 100644
--- a/sys/arch/next68k/next68k/machdep.c
+++ b/sys/arch/next68k/next68k/machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.113 2019/12/21 13:00:22 ad Exp $ */
+/* $NetBSD: machdep.c,v 1.114 2019/12/31 13:07:11 ad Exp $ */
/*
* Copyright (c) 1998 Darrin B. Jewell
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.113 2019/12/21 13:00:22 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.114 2019/12/31 13:07:11 ad Exp $");
#include "opt_ddb.h"
#include "opt_kgdb.h"
@@ -303,7 +303,7 @@ cpu_startup(void)
#ifdef DEBUG
pmapdebug = opmapdebug;
#endif
- format_bytes(pbuf, sizeof(pbuf), ptoa(uvm_free()));
+ format_bytes(pbuf, sizeof(pbuf), ptoa(uvm_availmem()));
printf("avail memory = %s\n", pbuf);
/*
diff --git a/sys/arch/powerpc/booke/booke_machdep.c b/sys/arch/powerpc/booke/booke_machdep.c
index d449ee40a04..669d69184b6 100644
--- a/sys/arch/powerpc/booke/booke_machdep.c
+++ b/sys/arch/powerpc/booke/booke_machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: booke_machdep.c,v 1.28 2019/12/27 09:45:26 msaitoh Exp $ */
+/* $NetBSD: booke_machdep.c,v 1.29 2019/12/31 13:07:11 ad Exp $ */
/*-
* Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -38,7 +38,7 @@
#define _POWERPC_BUS_DMA_PRIVATE
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: booke_machdep.c,v 1.28 2019/12/27 09:45:26 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: booke_machdep.c,v 1.29 2019/12/31 13:07:11 ad Exp $");
#include "opt_modular.h"
@@ -191,7 +191,7 @@ booke_cpu_startup(const char *model)
* pool pages.
*/
- format_bytes(pbuf, sizeof(pbuf), ptoa(uvm_free()));
+ format_bytes(pbuf, sizeof(pbuf), ptoa(uvm_availmem()));
printf("avail memory = %s\n", pbuf);
/*
diff --git a/sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c b/sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c
index 1f99effccd6..65f1560048b 100644
--- a/sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c
+++ b/sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ibm4xx_machdep.c,v 1.27 2019/12/21 13:00:22 ad Exp $ */
+/* $NetBSD: ibm4xx_machdep.c,v 1.28 2019/12/31 13:07:11 ad Exp $ */
/* Original: ibm40x_machdep.c,v 1.3 2005/01/17 17:19:36 shige Exp $ */
/*
@@ -68,7 +68,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ibm4xx_machdep.c,v 1.27 2019/12/21 13:00:22 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ibm4xx_machdep.c,v 1.28 2019/12/31 13:07:11 ad Exp $");
#include "opt_compat_netbsd.h"
#include "opt_ddb.h"
@@ -307,7 +307,7 @@ ibm4xx_cpu_startup(const char *model)
* pool pages.
*/
- format_bytes(pbuf, sizeof(pbuf), ptoa(uvm_free()));
+ format_bytes(pbuf, sizeof(pbuf), ptoa(uvm_availmem()));
printf("avail memory = %s\n", pbuf);
}
diff --git a/sys/arch/powerpc/oea/oea_machdep.c b/sys/arch/powerpc/oea/oea_machdep.c
index 85435018059..5a3238d8824 100644
--- a/sys/arch/powerpc/oea/oea_machdep.c
+++ b/sys/arch/powerpc/oea/oea_machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: oea_machdep.c,v 1.77 2019/12/21 13:00:22 ad Exp $ */
+/* $NetBSD: oea_machdep.c,v 1.78 2019/12/31 13:07:11 ad Exp $ */
/*
* Copyright (C) 2002 Matt Thomas
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: oea_machdep.c,v 1.77 2019/12/21 13:00:22 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: oea_machdep.c,v 1.78 2019/12/31 13:07:11 ad Exp $");
#include "opt_ppcarch.h"
#include "opt_compat_netbsd.h"
@@ -1000,7 +1000,7 @@ oea_startup(const char *model)
phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
VM_PHYS_SIZE, 0, false, NULL);
- format_bytes(pbuf, sizeof(pbuf), ptoa(uvm_free()));
+ format_bytes(pbuf, sizeof(pbuf), ptoa(uvm_availmem()));
printf("avail memory = %s\n", pbuf);
#ifdef MULTIPROCESSOR
diff --git a/sys/arch/riscv/riscv/riscv_machdep.c b/sys/arch/riscv/riscv/riscv_machdep.c
index 15a84b12c43..a0897af5f62 100644
--- a/sys/arch/riscv/riscv/riscv_machdep.c
+++ b/sys/arch/riscv/riscv/riscv_machdep.c
@@ -31,7 +31,7 @@
#include "opt_modular.h"
-__RCSID("$NetBSD: riscv_machdep.c,v 1.7 2019/12/21 13:00:23 ad Exp $");
+__RCSID("$NetBSD: riscv_machdep.c,v 1.8 2019/12/31 13:07:12 ad Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -326,7 +326,7 @@ cpu_startup(void)
phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
VM_PHYS_SIZE, 0, FALSE, NULL);
- format_bytes(pbuf, sizeof(pbuf), ptoa(uvm_free()));
+ format_bytes(pbuf, sizeof(pbuf), ptoa(uvm_availmem()));
printf("avail memory = %s\n", pbuf);
}
diff --git a/sys/arch/sgimips/sgimips/machdep.c b/sys/arch/sgimips/sgimips/machdep.c
index a3011103c27..fb5db28f04a 100644
--- a/sys/arch/sgimips/sgimips/machdep.c
+++ b/sys/arch/sgimips/sgimips/machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.148 2019/12/21 13:00:23 ad Exp $ */
+/* $NetBSD: machdep.c,v 1.149 2019/12/31 13:07:12 ad Exp $ */
/*
* Copyright (c) 2000 Soren S. Jorvang
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.148 2019/12/21 13:00:23 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.149 2019/12/31 13:07:12 ad Exp $");
#include "opt_ddb.h"
#include "opt_kgdb.h"
@@ -730,7 +730,7 @@ cpu_startup(void)
* are allocated via the pool allocator, and we use KSEG to
* map those pages.)
*/
- format_bytes(pbuf, sizeof(pbuf), ptoa(uvm_free()));
+ format_bytes(pbuf, sizeof(pbuf), ptoa(uvm_availmem()));
printf("avail memory = %s\n", pbuf);
}
diff --git a/sys/arch/sh3/sh3/sh3_machdep.c b/sys/arch/sh3/sh3/sh3_machdep.c
index a59e89fe685..9028bb3ad8c 100644
--- a/sys/arch/sh3/sh3/sh3_machdep.c
+++ b/sys/arch/sh3/sh3/sh3_machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: sh3_machdep.c,v 1.108 2019/12/21 13:00:23 ad Exp $ */
+/* $NetBSD: sh3_machdep.c,v 1.109 2019/12/31 13:07:12 ad Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2002 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sh3_machdep.c,v 1.108 2019/12/21 13:00:23 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sh3_machdep.c,v 1.109 2019/12/31 13:07:12 ad Exp $");
#include "opt_ddb.h"
#include "opt_kgdb.h"
@@ -304,7 +304,7 @@ sh_startup(void)
phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
VM_PHYS_SIZE, 0, false, NULL);
- format_bytes(pbuf, sizeof(pbuf), ptoa(uvm_free()));
+ format_bytes(pbuf, sizeof(pbuf), ptoa(uvm_availmem()));
printf("avail memory = %s\n", pbuf);
}
diff --git a/sys/arch/sparc/sparc/machdep.c b/sys/arch/sparc/sparc/machdep.c
index 5979157dd5f..bf6ca5a23d1 100644
--- a/sys/arch/sparc/sparc/machdep.c
+++ b/sys/arch/sparc/sparc/machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.332 2019/12/21 13:00:23 ad Exp $ */
+/* $NetBSD: machdep.c,v 1.333 2019/12/31 13:07:12 ad Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.332 2019/12/21 13:00:23 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.333 2019/12/31 13:07:12 ad Exp $");
#include "opt_compat_netbsd.h"
#include "opt_compat_sunos.h"
@@ -322,7 +322,7 @@ cpu_startup(void)
#ifdef DEBUG
pmapdebug = opmapdebug;
#endif
- format_bytes(pbuf, sizeof(pbuf), ptoa(uvm_free()));
+ format_bytes(pbuf, sizeof(pbuf), ptoa(uvm_availmem()));
printf("avail memory = %s\n", pbuf);
pmap_redzone();
diff --git a/sys/arch/sparc64/sparc64/machdep.c b/sys/arch/sparc64/sparc64/machdep.c
index d8ac05b8ff8..79564f1bbbb 100644
--- a/sys/arch/sparc64/sparc64/machdep.c
+++ b/sys/arch/sparc64/sparc64/machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.296 2019/12/21 13:00:23 ad Exp $ */
+/* $NetBSD: machdep.c,v 1.297 2019/12/31 13:07:12 ad Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2019 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.296 2019/12/21 13:00:23 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.297 2019/12/31 13:07:12 ad Exp $");
#include "opt_ddb.h"
#include "opt_multiprocessor.h"
@@ -195,7 +195,7 @@ cpu_startup(void)
#ifdef DEBUG
pmapdebug = opmapdebug;
#endif
- format_bytes(pbuf, sizeof(pbuf), ptoa(uvm_free()));
+ format_bytes(pbuf, sizeof(pbuf), ptoa(uvm_availmem()));
printf("avail memory = %s\n", pbuf);
#if 0
diff --git a/sys/arch/sun2/sun2/machdep.c b/sys/arch/sun2/sun2/machdep.c
index 3f5193ae7cf..75b95061739 100644
--- a/sys/arch/sun2/sun2/machdep.c
+++ b/sys/arch/sun2/sun2/machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.79 2019/12/21 13:00:23 ad Exp $ */
+/* $NetBSD: machdep.c,v 1.80 2019/12/31 13:07:12 ad Exp $ */
/*
* Copyright (c) 1982, 1986, 1990, 1993
@@ -149,7 +149,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.79 2019/12/21 13:00:23 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.80 2019/12/31 13:07:12 ad Exp $");
#include "opt_ddb.h"
#include "opt_kgdb.h"
@@ -336,7 +336,7 @@ cpu_startup(void)
phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
VM_PHYS_SIZE, 0, false, NULL);
- format_bytes(pbuf, sizeof(pbuf), ptoa(uvm_free()));
+ format_bytes(pbuf, sizeof(pbuf), ptoa(uvm_availmem()));
printf("avail memory = %s\n", pbuf);
/*
diff --git a/sys/arch/sun3/sun3/machdep.c b/sys/arch/sun3/sun3/machdep.c
index 28170e8afa7..946a62a9b3e 100644
--- a/sys/arch/sun3/sun3/machdep.c
+++ b/sys/arch/sun3/sun3/machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.210 2019/12/21 13:00:23 ad Exp $ */
+/* $NetBSD: machdep.c,v 1.211 2019/12/31 13:07:12 ad Exp $ */
/*
* Copyright (c) 1982, 1986, 1990, 1993
@@ -78,7 +78,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.210 2019/12/21 13:00:23 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.211 2019/12/31 13:07:12 ad Exp $");
#include "opt_ddb.h"
#include "opt_kgdb.h"
@@ -258,7 +258,7 @@ cpu_startup(void)
phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
VM_PHYS_SIZE, 0, false, NULL);
- format_bytes(pbuf, sizeof(pbuf), ptoa(uvm_free()));
+ format_bytes(pbuf, sizeof(pbuf), ptoa(uvm_availmem()));
printf("avail memory = %s\n", pbuf);
/*
diff --git a/sys/arch/sun3/sun3x/machdep.c b/sys/arch/sun3/sun3x/machdep.c
index de1c88867ac..03c4c992503 100644
--- a/sys/arch/sun3/sun3x/machdep.c
+++ b/sys/arch/sun3/sun3x/machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.137 2019/12/21 13:00:23 ad Exp $ */
+/* $NetBSD: machdep.c,v 1.138 2019/12/31 13:07:12 ad Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.137 2019/12/21 13:00:23 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.138 2019/12/31 13:07:12 ad Exp $");
#include "opt_ddb.h"
#include "opt_kgdb.h"
@@ -221,7 +221,7 @@ cpu_startup(void)
phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
VM_PHYS_SIZE, 0, false, NULL);
- format_bytes(pbuf, sizeof(pbuf), ptoa(uvm_free()));
+ format_bytes(pbuf, sizeof(pbuf), ptoa(uvm_availmem()));
printf("avail memory = %s\n", pbuf);
/*
diff --git a/sys/arch/vax/vax/machdep.c b/sys/arch/vax/vax/machdep.c
index 27c80812a47..746fba0ed20 100644
--- a/sys/arch/vax/vax/machdep.c
+++ b/sys/arch/vax/vax/machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.194 2019/12/21 13:00:24 ad Exp $ */
+/* $NetBSD: machdep.c,v 1.195 2019/12/31 13:07:12 ad Exp $ */
/*
* Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
@@ -83,7 +83,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.194 2019/12/21 13:00:24 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.195 2019/12/31 13:07:12 ad Exp $");
#include "opt_ddb.h"
#include "opt_compat_netbsd.h"
@@ -205,7 +205,7 @@ cpu_startup(void)
VM_PHYS_SIZE, 0, false, NULL);
#endif
- format_bytes(pbuf, sizeof(pbuf), ptoa(uvm_free()));
+ format_bytes(pbuf, sizeof(pbuf), ptoa(uvm_availmem()));
printf("avail memory = %s\n", pbuf);
#ifdef DDB
diff --git a/sys/arch/x68k/x68k/machdep.c b/sys/arch/x68k/x68k/machdep.c
index d0c9d0c5ad3..fd0624d1591 100644
--- a/sys/arch/x68k/x68k/machdep.c
+++ b/sys/arch/x68k/x68k/machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.201 2019/12/21 13:00:24 ad Exp $ */
+/* $NetBSD: machdep.c,v 1.202 2019/12/31 13:07:13 ad Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.201 2019/12/21 13:00:24 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.202 2019/12/31 13:07:13 ad Exp $");
#include "opt_ddb.h"
#include "opt_kgdb.h"
@@ -299,7 +299,7 @@ cpu_startup(void)
#ifdef DEBUG
pmapdebug = opmapdebug;
#endif
- format_bytes(pbuf, sizeof(pbuf), ptoa(uvm_free()));
+ format_bytes(pbuf, sizeof(pbuf), ptoa(uvm_availmem()));
printf("avail memory = %s\n", pbuf);
/*
diff --git a/sys/compat/linux/common/linux_misc.c b/sys/compat/linux/common/linux_misc.c
index 252405ef054..f872f1378f4 100644
--- a/sys/compat/linux/common/linux_misc.c
+++ b/sys/compat/linux/common/linux_misc.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_misc.c,v 1.246 2019/12/21 13:00:24 ad Exp $ */
+/* $NetBSD: linux_misc.c,v 1.247 2019/12/31 13:07:13 ad Exp $ */
/*-
* Copyright (c) 1995, 1998, 1999, 2008 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.246 2019/12/21 13:00:24 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.247 2019/12/31 13:07:13 ad Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1354,7 +1354,7 @@ linux_sys_sysinfo(struct lwp *l, const struct linux_sys_sysinfo_args *uap, regis
si.loads[1] = la->ldavg[1] * LINUX_SYSINFO_LOADS_SCALE / la->fscale;
si.loads[2] = la->ldavg[2] * LINUX_SYSINFO_LOADS_SCALE / la->fscale;
si.totalram = ctob((u_long)physmem);
- si.freeram = (u_long)uvm_free() * uvmexp.pagesize;
+ si.freeram = (u_long)uvm_availmem() * uvmexp.pagesize;
si.sharedram = 0; /* XXX */
si.bufferram = (u_long)uvmexp.filepages * uvmexp.pagesize;
si.totalswap = (u_long)uvmexp.swpages * uvmexp.pagesize;
diff --git a/sys/compat/linux32/common/linux32_sysinfo.c b/sys/compat/linux32/common/linux32_sysinfo.c
index dda57d7de2b..dc2a309a879 100644
--- a/sys/compat/linux32/common/linux32_sysinfo.c
+++ b/sys/compat/linux32/common/linux32_sysinfo.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux32_sysinfo.c,v 1.9 2019/12/21 13:00:24 ad Exp $ */
+/* $NetBSD: linux32_sysinfo.c,v 1.10 2019/12/31 13:07:13 ad Exp $ */
/*-
* Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved.
@@ -33,7 +33,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux32_sysinfo.c,v 1.9 2019/12/21 13:00:24 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux32_sysinfo.c,v 1.10 2019/12/31 13:07:13 ad Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -77,7 +77,7 @@ linux32_sys_sysinfo(struct lwp *l, const struct linux32_sys_sysinfo_args *uap, r
si.loads[1] = la->ldavg[1] * LINUX_SYSINFO_LOADS_SCALE / la->fscale;
si.loads[2] = la->ldavg[2] * LINUX_SYSINFO_LOADS_SCALE / la->fscale;
si.totalram = ctob((u_long)physmem);
- si.freeram = (u_long)uvm_free() * uvmexp.pagesize;
+ si.freeram = (u_long)uvm_availmem() * uvmexp.pagesize;
si.sharedram = 0; /* XXX */
si.bufferram = (u_long)uvmexp.filepages * uvmexp.pagesize;
si.totalswap = (u_long)uvmexp.swpages * uvmexp.pagesize;
diff --git a/sys/dev/ccd.c b/sys/dev/ccd.c
index 9541b30daca..bc70380646b 100644
--- a/sys/dev/ccd.c
+++ b/sys/dev/ccd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ccd.c,v 1.182 2019/12/21 13:00:24 ad Exp $ */
+/* $NetBSD: ccd.c,v 1.183 2019/12/31 13:07:13 ad Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 1999, 2007, 2009 The NetBSD Foundation, Inc.
@@ -88,7 +88,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ccd.c,v 1.182 2019/12/21 13:00:24 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ccd.c,v 1.183 2019/12/31 13:07:13 ad Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -702,7 +702,7 @@ ccdbackoff(struct ccd_softc *cs)
{
/* XXX Arbitrary, should be a uvm call. */
- return uvm_free() < (uvmexp.freemin >> 1) &&
+ return uvm_availmem() < (uvmexp.freemin >> 1) &&
disk_isbusy(&cs->sc_dkdev);
}
diff --git a/sys/fs/tmpfs/tmpfs_mem.c b/sys/fs/tmpfs/tmpfs_mem.c
index 1bf00c84a71..380b56aa7a7 100644
--- a/sys/fs/tmpfs/tmpfs_mem.c
+++ b/sys/fs/tmpfs/tmpfs_mem.c
@@ -1,4 +1,4 @@
-/* $NetBSD: tmpfs_mem.c,v 1.11 2019/12/21 13:00:24 ad Exp $ */
+/* $NetBSD: tmpfs_mem.c,v 1.12 2019/12/31 13:07:13 ad Exp $ */
/*
* Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tmpfs_mem.c,v 1.11 2019/12/21 13:00:24 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tmpfs_mem.c,v 1.12 2019/12/31 13:07:13 ad Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -102,7 +102,7 @@ tmpfs_mem_info(bool total)
if (!total) {
size -= uvmexp.swpgonly;
}
- size += uvm_free();
+ size += uvm_availmem();
size += uvmexp.filepages;
if (size > uvmexp.wired) {
size -= uvmexp.wired;
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index 6cb50415d78..c0c3e66a96f 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -1,4 +1,4 @@
-/* $NetBSD: init_main.c,v 1.513 2019/12/27 12:51:57 ad Exp $ */
+/* $NetBSD: init_main.c,v 1.514 2019/12/31 13:07:13 ad Exp $ */
/*-
* Copyright (c) 2008, 2009, 2019 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.513 2019/12/27 12:51:57 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.514 2019/12/31 13:07:13 ad Exp $");
#include "opt_ddb.h"
#include "opt_inet.h"
@@ -1178,6 +1178,6 @@ banner(void)
(*pr)("%s%s", copyright, version);
format_bytes(pbuf, MEM_PBUFSIZE, ctob((uint64_t)physmem));
(*pr)("total memory = %s\n", pbuf);
- format_bytes(pbuf, MEM_PBUFSIZE, ctob((uint64_t)uvm_free()));
+ format_bytes(pbuf, MEM_PBUFSIZE, ctob((uint64_t)uvm_availmem()));
(*pr)("avail memory = %s\n", pbuf);
}
diff --git a/sys/kern/kern_module.c b/sys/kern/kern_module.c
index 490fa7fcc39..7830f2188c4 100644
--- a/sys/kern/kern_module.c
+++ b/sys/kern/kern_module.c
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_module.c,v 1.142 2019/12/21 13:00:24 ad Exp $ */
+/* $NetBSD: kern_module.c,v 1.143 2019/12/31 13:07:13 ad Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.142 2019/12/21 13:00:24 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.143 2019/12/31 13:07:13 ad Exp $");
#define _MODULE_INTERNAL
@@ -1570,7 +1570,7 @@ module_thread(void *cookie)
if (!ISSET(mod->mod_flags, MODFLG_AUTO_LOADED))
continue;
- if (uvm_free() < uvmexp.freemin) {
+ if (uvm_availmem() < uvmexp.freemin) {
module_thread_ticks = hz;
} else if (module_autotime == 0 ||
mod->mod_autotime == 0) {
diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c
index 9faec929dae..c0df3366bee 100644
--- a/sys/kern/kern_proc.c
+++ b/sys/kern/kern_proc.c
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_proc.c,v 1.238 2019/12/21 13:00:24 ad Exp $ */
+/* $NetBSD: kern_proc.c,v 1.239 2019/12/31 13:07:13 ad Exp $ */
/*-
* Copyright (c) 1999, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_proc.c,v 1.238 2019/12/21 13:00:24 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_proc.c,v 1.239 2019/12/31 13:07:13 ad Exp $");
#ifdef _KERNEL_OPT
#include "opt_kstack.h"
@@ -487,7 +487,7 @@ proc0_init(void)
rlim[RLIMIT_NPROC].rlim_max = maxproc;
rlim[RLIMIT_NPROC].rlim_cur = maxproc < maxuprc ? maxproc : maxuprc;
- lim = MIN(VM_MAXUSER_ADDRESS, ctob((rlim_t)uvm_free()));
+ lim = MIN(VM_MAXUSER_ADDRESS, ctob((rlim_t)uvm_availmem()));
rlim[RLIMIT_RSS].rlim_max = lim;
rlim[RLIMIT_MEMLOCK].rlim_max = lim;
rlim[RLIMIT_MEMLOCK].rlim_cur = lim / 3;
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index e5616f5d0f3..ddc5f635ed6 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_bio.c,v 1.285 2019/12/27 09:41:51 msaitoh Exp $ */
+/* $NetBSD: vfs_bio.c,v 1.286 2019/12/31 13:07:13 ad Exp $ */
/*-
* Copyright (c) 2007, 2008, 2009, 2019 The NetBSD Foundation, Inc.
@@ -123,7 +123,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_bio.c,v 1.285 2019/12/27 09:41:51 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_bio.c,v 1.286 2019/12/31 13:07:13 ad Exp $");
#ifdef _KERNEL_OPT
#include "opt_bufcache.h"
@@ -614,7 +614,7 @@ buf_canrelease(void)
ninvalid += bufqueues[BQ_AGE].bq_bytes;
- pagedemand = uvmexp.freetarg - uvm_free();
+ pagedemand = uvmexp.freetarg - uvm_availmem();
if (pagedemand < 0)
return ninvalid;
return MAX(ninvalid, MIN(2 * MAXBSIZE,
diff --git a/sys/miscfs/procfs/procfs_linux.c b/sys/miscfs/procfs/procfs_linux.c
index cdc462717f5..f9aad563963 100644
--- a/sys/miscfs/procfs/procfs_linux.c
+++ b/sys/miscfs/procfs/procfs_linux.c
@@ -1,4 +1,4 @@
-/* $NetBSD: procfs_linux.c,v 1.78 2019/12/21 13:00:24 ad Exp $ */
+/* $NetBSD: procfs_linux.c,v 1.79 2019/12/31 13:07:13 ad Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: procfs_linux.c,v 1.78 2019/12/21 13:00:24 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: procfs_linux.c,v 1.79 2019/12/31 13:07:13 ad Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -142,7 +142,7 @@ procfs_domeminfo(struct lwp *curl, struct proc *p,
bf = malloc(LBFSZ, M_TEMP, M_WAITOK);
cpu_count_sync_all();
- freepg = (long)uvm_free();
+ freepg = (long)uvm_availmem();
filepg = (long)cpu_count_get(CPU_COUNT_FILEPAGES);
anonpg = (long)cpu_count_get(CPU_COUNT_ANONPAGES);
execpg = (long)cpu_count_get(CPU_COUNT_EXECPAGES);
diff --git a/sys/rump/librump/rumpkern/vm.c b/sys/rump/librump/rumpkern/vm.c
index 3e5a3fd7693..4e32f4f2c01 100644
--- a/sys/rump/librump/rumpkern/vm.c
+++ b/sys/rump/librump/rumpkern/vm.c
@@ -1,4 +1,4 @@
-/* $NetBSD: vm.c,v 1.178 2019/12/31 12:40:27 ad Exp $ */
+/* $NetBSD: vm.c,v 1.179 2019/12/31 13:07:13 ad Exp $ */
/*
* Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved.
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.178 2019/12/31 12:40:27 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.179 2019/12/31 13:07:13 ad Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -410,7 +410,7 @@ uvm_pageunwire(struct vm_page *pg)
}
int
-uvm_free(void)
+uvm_availmem(void)
{
return uvmexp.free;
diff --git a/sys/ufs/chfs/chfs_subr.c b/sys/ufs/chfs/chfs_subr.c
index a1389e42bd1..90557218c99 100644
--- a/sys/ufs/chfs/chfs_subr.c
+++ b/sys/ufs/chfs/chfs_subr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: chfs_subr.c,v 1.10 2019/12/21 13:00:25 ad Exp $ */
+/* $NetBSD: chfs_subr.c,v 1.11 2019/12/31 13:07:13 ad Exp $ */
/*-
* Copyright (c) 2010 Department of Software Engineering,
@@ -79,7 +79,7 @@ chfs_mem_info(bool total)
if (!total) {
size -= uvmexp.swpgonly;
}
- size += uvm_free();
+ size += uvm_availmem();
size += uvmexp.filepages;
if (size > uvmexp.wired) {
size -= uvmexp.wired;
diff --git a/sys/ufs/lfs/lfs_bio.c b/sys/ufs/lfs/lfs_bio.c
index b0f133afafd..6115c5df3f9 100644
--- a/sys/ufs/lfs/lfs_bio.c
+++ b/sys/ufs/lfs/lfs_bio.c
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_bio.c,v 1.143 2019/12/21 13:00:25 ad Exp $ */
+/* $NetBSD: lfs_bio.c,v 1.144 2019/12/31 13:07:14 ad Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2002, 2003, 2008 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_bio.c,v 1.143 2019/12/21 13:00:25 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_bio.c,v 1.144 2019/12/31 13:07:14 ad Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -767,7 +767,7 @@ lfs_wait_pages(void)
int active, inactive;
uvm_estimatepageable(&active, &inactive);
- return LFS_WAIT_RESOURCE(active + inactive + uvm_free(), 1);
+ return LFS_WAIT_RESOURCE(active + inactive + uvm_availmem(), 1);
}
int
@@ -776,5 +776,5 @@ lfs_max_pages(void)
int active, inactive;
uvm_estimatepageable(&active, &inactive);
- return LFS_MAX_RESOURCE(active + inactive + uvm_free(), 1);
+ return LFS_MAX_RESOURCE(active + inactive + uvm_availmem(), 1);
}
diff --git a/sys/uvm/uvm_extern.h b/sys/uvm/uvm_extern.h
index bd037d89db1..edea6536716 100644
--- a/sys/uvm/uvm_extern.h
+++ b/sys/uvm/uvm_extern.h
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_extern.h,v 1.216 2019/12/27 12:51:57 ad Exp $ */
+/* $NetBSD: uvm_extern.h,v 1.217 2019/12/31 13:07:14 ad Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -736,7 +736,7 @@ int uvm_obj_wirepages(struct uvm_object *, off_t, off_t,
void uvm_obj_unwirepages(struct uvm_object *, off_t, off_t);
/* uvm_page.c */
-int uvm_free(void);
+int uvm_availmem(void);
void uvm_page_numa_load(paddr_t, paddr_t, u_int);
struct vm_page *uvm_pagealloc_strat(struct uvm_object *,
voff_t, struct vm_anon *, int, int, int);
diff --git a/sys/uvm/uvm_glue.c b/sys/uvm/uvm_glue.c
index 06ed45c5f95..14b3a2e2dc9 100644
--- a/sys/uvm/uvm_glue.c
+++ b/sys/uvm/uvm_glue.c
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_glue.c,v 1.173 2019/12/27 12:51:57 ad Exp $ */
+/* $NetBSD: uvm_glue.c,v 1.174 2019/12/31 13:07:14 ad Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_glue.c,v 1.173 2019/12/27 12:51:57 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_glue.c,v 1.174 2019/12/31 13:07:14 ad Exp $");
#include "opt_kgdb.h"
#include "opt_kstack.h"
@@ -482,7 +482,7 @@ uvm_init_limits(struct proc *p)
p->p_rlimit[RLIMIT_AS].rlim_cur = RLIM_INFINITY;
p->p_rlimit[RLIMIT_AS].rlim_max = RLIM_INFINITY;
p->p_rlimit[RLIMIT_RSS].rlim_cur = MIN(VM_MAXUSER_ADDRESS,
- ctob((rlim_t)uvm_free()));
+ ctob((rlim_t)uvm_availmem()));
}
/*
diff --git a/sys/uvm/uvm_meter.c b/sys/uvm/uvm_meter.c
index f27f37711a8..06d018149ce 100644
--- a/sys/uvm/uvm_meter.c
+++ b/sys/uvm/uvm_meter.c
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_meter.c,v 1.72 2019/12/21 14:33:18 ad Exp $ */
+/* $NetBSD: uvm_meter.c,v 1.73 2019/12/31 13:07:14 ad Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_meter.c,v 1.72 2019/12/21 14:33:18 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_meter.c,v 1.73 2019/12/31 13:07:14 ad Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -107,7 +107,7 @@ sysctl_vm_uvmexp2(SYSCTLFN_ARGS)
u.pagemask = uvmexp.pagemask;
u.pageshift = uvmexp.pageshift;
u.npages = uvmexp.npages;
- u.free = uvm_free();
+ u.free = uvm_availmem();
u.active = active;
u.inactive = inactive;
u.paging = uvmexp.paging;
@@ -382,7 +382,7 @@ uvm_total(struct vmtotal *totalp)
/*
* Calculate object memory usage statistics.
*/
- freepg = uvm_free();
+ freepg = uvm_availmem();
uvm_estimatepageable(&active, NULL);
totalp->t_free = freepg;
totalp->t_vm = uvmexp.npages - freepg + uvmexp.swpginuse;
@@ -449,7 +449,7 @@ uvm_update_uvmexp(void)
cpu_count_sync_all();
- uvmexp.free = (int)uvm_free();
+ uvmexp.free = (int)uvm_availmem();
uvmexp.zeropages = (int)cpu_count_get(CPU_COUNT_ZEROPAGES);
uvmexp.cpuhit = (int)cpu_count_get(CPU_COUNT_CPUHIT);
uvmexp.cpumiss = (int)cpu_count_get(CPU_COUNT_CPUMISS);
diff --git a/sys/uvm/uvm_page.c b/sys/uvm/uvm_page.c
index 7ea1e220b0d..3147853168d 100644
--- a/sys/uvm/uvm_page.c
+++ b/sys/uvm/uvm_page.c
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_page.c,v 1.218 2019/12/31 12:40:27 ad Exp $ */
+/* $NetBSD: uvm_page.c,v 1.219 2019/12/31 13:07:14 ad Exp $ */
/*-
* Copyright (c) 2019 The NetBSD Foundation, Inc.
@@ -95,7 +95,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.218 2019/12/31 12:40:27 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.219 2019/12/31 13:07:14 ad Exp $");
#include "opt_ddb.h"
#include "opt_uvm.h"
@@ -993,13 +993,13 @@ uvm_cpu_attach(struct cpu_info *ci)
}
/*
- * uvm_free: fetch the total amount of free memory in pages. This can have a
- * detrimental effect on performance due to false sharing; don't call unless
- * needed.
+ * uvm_availmem: fetch the total amount of free memory in pages. this can
+ * have a detrimental effect on performance due to false sharing; don't call
+ * unless needed.
*/
int
-uvm_free(void)
+uvm_availmem(void)
{
struct pgfreelist *pgfl;
int fl, b, fpages;
diff --git a/sys/uvm/uvm_pdaemon.c b/sys/uvm/uvm_pdaemon.c
index c7301b57f36..07328e7c237 100644
--- a/sys/uvm/uvm_pdaemon.c
+++ b/sys/uvm/uvm_pdaemon.c
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_pdaemon.c,v 1.120 2019/12/31 12:40:27 ad Exp $ */
+/* $NetBSD: uvm_pdaemon.c,v 1.121 2019/12/31 13:07:14 ad Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_pdaemon.c,v 1.120 2019/12/31 12:40:27 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_pdaemon.c,v 1.121 2019/12/31 13:07:14 ad Exp $");
#include "opt_uvmhist.h"
#include "opt_readahead.h"
@@ -182,7 +182,7 @@ uvm_wait(const char *wmsg)
void
uvm_kick_pdaemon(void)
{
- int fpages = uvm_free();
+ int fpages = uvm_availmem();
if (fpages + uvmexp.paging < uvmexp.freemin ||
(fpages + uvmexp.paging < uvmexp.freetarg &&
@@ -300,7 +300,7 @@ uvm_pageout(void *arg)
* Estimate a hint. Note that bufmem are returned to
* system only when entire pool page is empty.
*/
- fpages = uvm_free();
+ fpages = uvm_availmem();
UVMHIST_LOG(pdhist," free/ftarg=%jd/%jd",
fpages, uvmexp.freetarg, 0,0);
@@ -318,7 +318,8 @@ uvm_pageout(void *arg)
* if there's any free memory to be had,
* wake up any waiters.
*/
- if (uvm_free() > uvmexp.reserve_kernel || uvmexp.paging == 0) {
+ if (uvm_availmem() > uvmexp.reserve_kernel ||
+ uvmexp.paging == 0) {
mutex_spin_enter(&uvmpd_lock);
wakeup(&uvmexp.free);
uvm_pagedaemon_waiters = 0;
@@ -379,7 +380,7 @@ uvm_pageout_done(int npages)
*/
mutex_spin_enter(&uvmpd_lock);
- if (uvm_free() <= uvmexp.reserve_kernel) {
+ if (uvm_availmem() <= uvmexp.reserve_kernel) {
wakeup(&uvm.pagedaemon);
} else if (uvm_pagedaemon_waiters != 0) {
wakeup(&uvmexp.free);
@@ -666,7 +667,7 @@ uvmpd_scan_queue(void)
* see if we've met the free target.
*/
- if (uvm_free() + uvmexp.paging
+ if (uvm_availmem() + uvmexp.paging
#if defined(VMSWAP)
+ swapcluster_nused(&swc)
#endif /* defined(VMSWAP) */
@@ -795,7 +796,7 @@ uvmpd_scan_queue(void)
* free target when all the current pageouts complete.
*/
- if (uvm_free() + uvmexp.paging > uvmexp.freetarg << 2) {
+ if (uvm_availmem() + uvmexp.paging > uvmexp.freetarg << 2) {
mutex_exit(slock);
continue;
}
@@ -904,7 +905,7 @@ uvmpd_scan(void)
*/
swap_shortage = 0;
- fpages = uvm_free();
+ fpages = uvm_availmem();
if (fpages < uvmexp.freetarg &&
uvmexp.swpginuse >= uvmexp.swpgavail &&
!uvm_swapisfull() &&
@@ -919,7 +920,7 @@ uvmpd_scan(void)
* modules.
*/
- if (uvm_free() < uvmexp.freemin) {
+ if (uvm_availmem() < uvmexp.freemin) {
module_thread_kick();
}
}
@@ -1030,7 +1031,7 @@ uvmpd_pool_drain_thread(void *arg)
/*
* kill unused metadata buffers.
*/
- bufcnt = uvmexp.freetarg - uvm_free();
+ bufcnt = uvmexp.freetarg - uvm_availmem();
if (bufcnt < 0)
bufcnt = 0;
diff --git a/sys/uvm/uvm_pdpolicy_clock.c b/sys/uvm/uvm_pdpolicy_clock.c
index f30d1123227..70c219196d2 100644
--- a/sys/uvm/uvm_pdpolicy_clock.c
+++ b/sys/uvm/uvm_pdpolicy_clock.c
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_pdpolicy_clock.c,v 1.26 2019/12/31 12:40:27 ad Exp $ */
+/* $NetBSD: uvm_pdpolicy_clock.c,v 1.27 2019/12/31 13:07:14 ad Exp $ */
/* NetBSD: uvm_pdaemon.c,v 1.72 2006/01/05 10:47:33 yamt Exp $ */
/*
@@ -69,7 +69,7 @@
#else /* defined(PDSIM) */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_pdpolicy_clock.c,v 1.26 2019/12/31 12:40:27 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_pdpolicy_clock.c,v 1.27 2019/12/31 13:07:14 ad Exp $");
#include <sys/param.h>
#include <sys/proc.h>
@@ -154,7 +154,7 @@ uvmpdpol_scaninit(void)
*/
cpu_count_sync_all();
- freepg = uvm_free();
+ freepg = uvm_availmem();
anonpg = cpu_count_get(CPU_COUNT_ANONPAGES);
filepg = cpu_count_get(CPU_COUNT_FILEPAGES);
execpg = cpu_count_get(CPU_COUNT_EXECPAGES);
diff --git a/sys/uvm/uvm_pglist.c b/sys/uvm/uvm_pglist.c
index e18b46c5c6d..130b0926517 100644
--- a/sys/uvm/uvm_pglist.c
+++ b/sys/uvm/uvm_pglist.c
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_pglist.c,v 1.78 2019/12/27 12:51:57 ad Exp $ */
+/* $NetBSD: uvm_pglist.c,v 1.79 2019/12/31 13:07:14 ad Exp $ */
/*-
* Copyright (c) 1997, 2019 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_pglist.c,v 1.78 2019/12/27 12:51:57 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_pglist.c,v 1.79 2019/12/31 13:07:14 ad Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -309,7 +309,8 @@ uvm_pglistalloc_contig(int num, paddr_t low, paddr_t high, paddr_t alignment,
uvm_pgfl_lock();
/* Are there even any free pages? */
- if (uvm_free() <= (uvmexp.reserve_pagedaemon + uvmexp.reserve_kernel))
+ if (uvm_availmem() <=
+ (uvmexp.reserve_pagedaemon + uvmexp.reserve_kernel))
goto out;
for (fl = 0; fl < VM_NFREELIST; fl++) {
@@ -454,7 +455,8 @@ again:
count++;
/* Are there even any free pages? */
- if (uvm_free() <= (uvmexp.reserve_pagedaemon + uvmexp.reserve_kernel))
+ if (uvm_availmem() <=
+ (uvmexp.reserve_pagedaemon + uvmexp.reserve_kernel))
goto out;
for (fl = 0; fl < VM_NFREELIST; fl++) {
diff --git a/sys/uvm/uvm_stat.c b/sys/uvm/uvm_stat.c
index 9b0a25d8774..232bf5e86ec 100644
--- a/sys/uvm/uvm_stat.c
+++ b/sys/uvm/uvm_stat.c
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_stat.c,v 1.42 2019/12/21 13:00:25 ad Exp $ */
+/* $NetBSD: uvm_stat.c,v 1.43 2019/12/31 13:07:14 ad Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_stat.c,v 1.42 2019/12/21 13:00:25 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_stat.c,v 1.43 2019/12/31 13:07:14 ad Exp $");
#include "opt_readahead.h"
#include "opt_ddb.h"
@@ -67,7 +67,7 @@ uvmexp_print(void (*pr)(const char *, ...)
uvmexp.pagesize, uvmexp.pagesize, uvmexp.pagemask,
uvmexp.pageshift, uvmexp.ncolors);
(*pr)(" %d VM pages: %d active, %d inactive, %d wired, %d free\n",
- uvmexp.npages, active, inactive, uvmexp.wired, uvm_free());
+ uvmexp.npages, active, inactive, uvmexp.wired, uvm_availmem());
(*pr)(" pages %" PRId64 " anon, %" PRId64 " file, %" PRId64 " exec\n",
cpu_count_get(CPU_COUNT_ANONPAGES),
cpu_count_get(CPU_COUNT_FILEPAGES),