Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/uvm Fix a silly mistake I made when reworking the uvm in...



details:   https://anonhg.NetBSD.org/src/rev/d0be53915a6c
branches:  trunk
changeset: 509578:d0be53915a6c
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Mon May 07 22:01:28 2001 +0000

description:
Fix a silly mistake I made when reworking the uvm inactive list
some time ago.  The mistake was to check that the page was not
referenced since the last active scan before moving it to inactive.
Now we just clear reference and move it to inacive (which is where
the second clock hand sweep occurs).

diffstat:

 sys/uvm/uvm_pdaemon.c |  13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diffs (29 lines):

diff -r 82be219443f7 -r d0be53915a6c sys/uvm/uvm_pdaemon.c
--- a/sys/uvm/uvm_pdaemon.c     Mon May 07 21:48:24 2001 +0000
+++ b/sys/uvm/uvm_pdaemon.c     Mon May 07 22:01:28 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_pdaemon.c,v 1.31 2001/03/10 22:46:50 chs Exp $     */
+/*     $NetBSD: uvm_pdaemon.c,v 1.32 2001/05/07 22:01:28 thorpej Exp $ */
 
 /* 
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -966,13 +966,14 @@
                }
 
                /*
-                * If the page has not been referenced since the
-                * last scan, deactivate the page if there is a
-                * shortage of inactive pages.
+                * If we're short on inactive pages, move this over
+                * to the inactive list.  The second hand will sweep
+                * it later, and if it has been referenced again, it
+                * will be moved back to active.
                 */
 
-               if (inactive_shortage > 0 &&
-                   pmap_clear_reference(p) == FALSE) {
+               if (inactive_shortage > 0) {
+                       pmap_clear_reference(p);
                        /* no need to check wire_count as pg is "active" */
                        uvm_pagedeactivate(p);
                        uvmexp.pddeact++;



Home | Main Index | Thread Index | Old Index