Source-Changes-HG archive

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

[src/trunk]: src/sys/uvm Use the high bits of pqflags for PQ_TIME, not low.



details:   https://anonhg.NetBSD.org/src/rev/ce2be81755b1
branches:  trunk
changeset: 1005679:ce2be81755b1
user:      ad <ad%NetBSD.org@localhost>
date:      Mon Dec 16 19:18:26 2019 +0000

description:
Use the high bits of pqflags for PQ_TIME, not low.

diffstat:

 sys/uvm/uvm_pdpolicy_clock.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (40 lines):

diff -r 857b8b749e43 -r ce2be81755b1 sys/uvm/uvm_pdpolicy_clock.c
--- a/sys/uvm/uvm_pdpolicy_clock.c      Mon Dec 16 19:17:25 2019 +0000
+++ b/sys/uvm/uvm_pdpolicy_clock.c      Mon Dec 16 19:18:26 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_pdpolicy_clock.c,v 1.18 2019/12/13 20:10:22 ad Exp $       */
+/*     $NetBSD: uvm_pdpolicy_clock.c,v 1.19 2019/12/16 19:18:26 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.18 2019/12/13 20:10:22 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_pdpolicy_clock.c,v 1.19 2019/12/16 19:18:26 ad Exp $");
 
 #include <sys/param.h>
 #include <sys/proc.h>
@@ -83,9 +83,9 @@
 
 #endif /* defined(PDSIM) */
 
-#define        PQ_TIME         0x3fffffff      /* time of last activation */
-#define PQ_INACTIVE    0x40000000      /* page is in inactive list */
-#define PQ_ACTIVE      0x80000000      /* page is in active list */
+#define        PQ_TIME         0xfffffffc      /* time of last activation */
+#define PQ_INACTIVE    0x00000001      /* page is in inactive list */
+#define PQ_ACTIVE      0x00000002      /* page is in active list */
 
 #if !defined(CLOCK_INACTIVEPCT)
 #define        CLOCK_INACTIVEPCT       33
@@ -407,7 +407,7 @@
 
        /* Safety: PQ_ACTIVE clear also tells us if it is not enqueued. */
        if ((pg->pqflags & PQ_ACTIVE) == 0 ||
-           ((hardclock_ticks & PQ_TIME) - (pg->pqflags & PQ_TIME)) > hz) {
+           ((hardclock_ticks & PQ_TIME) - (pg->pqflags & PQ_TIME)) >= hz) {
                mutex_enter(&s->lock);
                uvmpdpol_pageactivate_locked(pg);
                mutex_exit(&s->lock);



Home | Main Index | Thread Index | Old Index