Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm count aobj pages (most notably kernel stack pages) a...
details: https://anonhg.NetBSD.org/src/rev/111180ce9eb0
branches: trunk
changeset: 533076:111180ce9eb0
user: chs <chs%NetBSD.org@localhost>
date: Thu Jun 20 15:05:29 2002 +0000
description:
count aobj pages (most notably kernel stack pages) as anon pages
for memory usage-balancing purposes.
diffstat:
sys/uvm/uvm_object.h | 4 +++-
sys/uvm/uvm_page.c | 10 ++++++++--
sys/uvm/uvm_pdaemon.c | 6 +++---
3 files changed, 14 insertions(+), 6 deletions(-)
diffs (83 lines):
diff -r 7d41ec8b2400 -r 111180ce9eb0 sys/uvm/uvm_object.h
--- a/sys/uvm/uvm_object.h Thu Jun 20 13:24:37 2002 +0000
+++ b/sys/uvm/uvm_object.h Thu Jun 20 15:05:29 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_object.h,v 1.15 2002/05/15 06:57:50 matt Exp $ */
+/* $NetBSD: uvm_object.h,v 1.16 2002/06/20 15:05:29 chs Exp $ */
/*
*
@@ -84,6 +84,8 @@
((uobj)->pgops == &uvm_vnodeops && \
((struct vnode *)uobj)->v_flag & VEXECMAP)
+#define UVM_OBJ_IS_AOBJ(uobj) \
+ ((uobj)->pgops == &aobj_pager)
#endif /* _KERNEL */
diff -r 7d41ec8b2400 -r 111180ce9eb0 sys/uvm/uvm_page.c
--- a/sys/uvm/uvm_page.c Thu Jun 20 13:24:37 2002 +0000
+++ b/sys/uvm/uvm_page.c Thu Jun 20 15:05:29 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_page.c,v 1.77 2002/06/19 17:01:18 wrstuden Exp $ */
+/* $NetBSD: uvm_page.c,v 1.78 2002/06/20 15:05:29 chs Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.77 2002/06/19 17:01:18 wrstuden Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.78 2002/06/20 15:05:29 chs Exp $");
#include "opt_uvmhist.h"
@@ -172,6 +172,10 @@
TAILQ_INSERT_TAIL(buck, pg, hashq);
simple_unlock(&uvm.hashlock);
+ if (UVM_OBJ_IS_AOBJ(uobj)) {
+ uvmexp.anonpages++;
+ }
+
TAILQ_INSERT_TAIL(&uobj->memq, pg, listq);
pg->flags |= PG_TABLED;
uobj->uo_npages++;
@@ -201,6 +205,8 @@
uvmexp.execpages--;
} else if (UVM_OBJ_IS_VNODE(uobj)) {
uvmexp.filepages--;
+ } else if (UVM_OBJ_IS_AOBJ(uobj)) {
+ uvmexp.anonpages--;
}
/* object should be locked */
diff -r 7d41ec8b2400 -r 111180ce9eb0 sys/uvm/uvm_pdaemon.c
--- a/sys/uvm/uvm_pdaemon.c Thu Jun 20 13:24:37 2002 +0000
+++ b/sys/uvm/uvm_pdaemon.c Thu Jun 20 15:05:29 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_pdaemon.c,v 1.46 2002/05/05 16:26:17 chs Exp $ */
+/* $NetBSD: uvm_pdaemon.c,v 1.47 2002/06/20 15:05:29 chs Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_pdaemon.c,v 1.46 2002/05/05 16:26:17 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_pdaemon.c,v 1.47 2002/06/20 15:05:29 chs Exp $");
#include "opt_uvmhist.h"
@@ -463,7 +463,7 @@
uvmexp.pdrefile++;
continue;
}
- if (anon && anonreact) {
+ if ((anon || UVM_OBJ_IS_AOBJ(uobj)) && anonreact) {
uvm_pageactivate(p);
uvmexp.pdreanon++;
continue;
Home |
Main Index |
Thread Index |
Old Index