Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm Merge the swap-backed and object-backed inactive lists.
details: https://anonhg.NetBSD.org/src/rev/f94666d8dbcb
branches: trunk
changeset: 510185:f94666d8dbcb
user: ross <ross%NetBSD.org@localhost>
date: Tue May 22 00:44:44 2001 +0000
description:
Merge the swap-backed and object-backed inactive lists.
diffstat:
sys/uvm/uvm.h | 5 ++---
sys/uvm/uvm_map.c | 5 ++---
sys/uvm/uvm_page.c | 10 +++-------
sys/uvm/uvm_page_i.h | 17 ++++-------------
sys/uvm/uvm_pdaemon.c | 9 ++-------
5 files changed, 13 insertions(+), 33 deletions(-)
diffs (137 lines):
diff -r 11e8fdf9757c -r f94666d8dbcb sys/uvm/uvm.h
--- a/sys/uvm/uvm.h Tue May 22 00:43:12 2001 +0000
+++ b/sys/uvm/uvm.h Tue May 22 00:44:44 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm.h,v 1.25 2001/04/29 04:23:21 thorpej Exp $ */
+/* $NetBSD: uvm.h,v 1.26 2001/05/22 00:44:44 ross Exp $ */
/*
*
@@ -81,8 +81,7 @@
struct pgfreelist page_free[VM_NFREELIST]; /* unallocated pages */
int page_free_nextcolor; /* next color to allocate from */
struct pglist page_active; /* allocated pages, in use */
- struct pglist page_inactive_swp;/* pages inactive (reclaim or free) */
- struct pglist page_inactive_obj;/* pages inactive (reclaim or free) */
+ struct pglist page_inactive; /* pages between the clock hands */
simple_lock_data_t pageqlock; /* lock for active/inactive page q */
simple_lock_data_t fpageqlock; /* lock for free page q */
boolean_t page_init_done; /* TRUE if uvm_page_init() finished */
diff -r 11e8fdf9757c -r f94666d8dbcb sys/uvm/uvm_map.c
--- a/sys/uvm/uvm_map.c Tue May 22 00:43:12 2001 +0000
+++ b/sys/uvm/uvm_map.c Tue May 22 00:44:44 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_map.c,v 1.96 2001/04/29 04:23:21 thorpej Exp $ */
+/* $NetBSD: uvm_map.c,v 1.97 2001/05/22 00:44:44 ross Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -3328,8 +3328,7 @@
pgl = &uvm.page_free[fl].pgfl_buckets[color].pgfl_queues[
((pg)->flags & PG_ZERO) ? PGFL_ZEROS : PGFL_UNKNOWN];
} else if (pg->pqflags & PQ_INACTIVE) {
- pgl = (pg->pqflags & PQ_SWAPBACKED) ?
- &uvm.page_inactive_swp : &uvm.page_inactive_obj;
+ pgl = &uvm.page_inactive;
} else if (pg->pqflags & PQ_ACTIVE) {
pgl = &uvm.page_active;
} else {
diff -r 11e8fdf9757c -r f94666d8dbcb sys/uvm/uvm_page.c
--- a/sys/uvm/uvm_page.c Tue May 22 00:43:12 2001 +0000
+++ b/sys/uvm/uvm_page.c Tue May 22 00:44:44 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_page.c,v 1.60 2001/05/02 01:22:20 thorpej Exp $ */
+/* $NetBSD: uvm_page.c,v 1.61 2001/05/22 00:44:44 ross Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -248,8 +248,7 @@
*/
TAILQ_INIT(&uvm.page_active);
- TAILQ_INIT(&uvm.page_inactive_swp);
- TAILQ_INIT(&uvm.page_inactive_obj);
+ TAILQ_INIT(&uvm.page_inactive);
simple_lock_init(&uvm.pageqlock);
simple_lock_init(&uvm.fpageqlock);
@@ -1319,10 +1318,7 @@
uvmexp.active--;
}
if (pg->pqflags & PQ_INACTIVE) {
- if (pg->pqflags & PQ_SWAPBACKED)
- TAILQ_REMOVE(&uvm.page_inactive_swp, pg, pageq);
- else
- TAILQ_REMOVE(&uvm.page_inactive_obj, pg, pageq);
+ TAILQ_REMOVE(&uvm.page_inactive, pg, pageq);
pg->pqflags &= ~PQ_INACTIVE;
uvmexp.inactive--;
}
diff -r 11e8fdf9757c -r f94666d8dbcb sys/uvm/uvm_page_i.h
--- a/sys/uvm/uvm_page_i.h Tue May 22 00:43:12 2001 +0000
+++ b/sys/uvm/uvm_page_i.h Tue May 22 00:44:44 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_page_i.h,v 1.16 2001/01/28 23:30:45 thorpej Exp $ */
+/* $NetBSD: uvm_page_i.h,v 1.17 2001/05/22 00:44:45 ross Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -160,10 +160,7 @@
uvmexp.active--;
}
if (pg->pqflags & PQ_INACTIVE) {
- if (pg->pqflags & PQ_SWAPBACKED)
- TAILQ_REMOVE(&uvm.page_inactive_swp, pg, pageq);
- else
- TAILQ_REMOVE(&uvm.page_inactive_obj, pg, pageq);
+ TAILQ_REMOVE(&uvm.page_inactive, pg, pageq);
pg->pqflags &= ~PQ_INACTIVE;
uvmexp.inactive--;
}
@@ -212,10 +209,7 @@
}
if ((pg->pqflags & PQ_INACTIVE) == 0) {
KASSERT(pg->wire_count == 0);
- if (pg->pqflags & PQ_SWAPBACKED)
- TAILQ_INSERT_TAIL(&uvm.page_inactive_swp, pg, pageq);
- else
- TAILQ_INSERT_TAIL(&uvm.page_inactive_obj, pg, pageq);
+ TAILQ_INSERT_TAIL(&uvm.page_inactive, pg, pageq);
pg->pqflags |= PQ_INACTIVE;
uvmexp.inactive++;
@@ -242,10 +236,7 @@
struct vm_page *pg;
{
if (pg->pqflags & PQ_INACTIVE) {
- if (pg->pqflags & PQ_SWAPBACKED)
- TAILQ_REMOVE(&uvm.page_inactive_swp, pg, pageq);
- else
- TAILQ_REMOVE(&uvm.page_inactive_obj, pg, pageq);
+ TAILQ_REMOVE(&uvm.page_inactive, pg, pageq);
pg->pqflags &= ~PQ_INACTIVE;
uvmexp.inactive--;
}
diff -r 11e8fdf9757c -r f94666d8dbcb sys/uvm/uvm_pdaemon.c
--- a/sys/uvm/uvm_pdaemon.c Tue May 22 00:43:12 2001 +0000
+++ b/sys/uvm/uvm_pdaemon.c Tue May 22 00:44:44 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_pdaemon.c,v 1.32 2001/05/07 22:01:28 thorpej Exp $ */
+/* $NetBSD: uvm_pdaemon.c,v 1.33 2001/05/22 00:44:45 ross Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -873,12 +873,7 @@
got_it = FALSE;
pages_freed = uvmexp.pdfreed;
- if ((uvmexp.pdrevs & 1) != 0 && uvmexp.nswapdev != 0)
- got_it = uvmpd_scan_inactive(&uvm.page_inactive_swp);
- if (!got_it)
- got_it = uvmpd_scan_inactive(&uvm.page_inactive_obj);
- if (!got_it && (uvmexp.pdrevs & 1) == 0 && uvmexp.nswapdev != 0)
- (void) uvmpd_scan_inactive(&uvm.page_inactive_swp);
+ (void) uvmpd_scan_inactive(&uvm.page_inactive);
pages_freed = uvmexp.pdfreed - pages_freed;
/*
Home |
Main Index |
Thread Index |
Old Index