Here's a proposed patch for this problem:

Index: src/sys/i386/i386/pmap.c
===================================================================
RCS file: /x/freebsd/src/sys/i386/i386/pmap.c,v
retrieving revision 1.376
diff -u -r1.376 pmap.c
--- src/sys/i386/i386/pmap.c    3 Dec 2002 04:00:42 -0000       1.376
+++ src/sys/i386/i386/pmap.c    13 Dec 2002 02:54:44 -0000
@@ -3300,7 +3300,7 @@
 {
        pt_entry_t *ptep, pte;
        vm_page_t m;
-       int val = 0;
+       int refd, val = 0;
        
        ptep = pmap_pte(pmap, addr);
        if (ptep == 0) {
@@ -3337,9 +3337,17 @@
                /*
                 * Referenced by someone
                 */
-               else if ((m->flags & PG_REFERENCED) || pmap_ts_referenced(m)) {
+               else if (m->flags & PG_REFERENCED) {
                        val |= MINCORE_REFERENCED_OTHER;
                        vm_page_flag_set(m, PG_REFERENCED);
+               } else {
+                       vm_page_lock_queues();
+                       refd = pmap_ts_referenced(m);
+                       vm_page_unlock_queues();
+                       if (refd) {
+                               val |= MINCORE_REFERENCED_OTHER;
+                               vm_page_flag_set(m, PG_REFERENCED);
+                       }
                }
        } 
        return val;

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to