kernel - Check PG_MARKER in pmap_object_init_pt_callback()
authorMatthew Dillon <dillon@apollo.backplane.com>
Tue, 29 Nov 2011 06:08:40 +0000 (22:08 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Tue, 29 Nov 2011 06:08:40 +0000 (22:08 -0800)
* All PG_MARKER pages are also PG_BUSY so the code was already handling
  the case, but checking for PG_MARKER is the official way to check for
  a marker so do that too.

sys/platform/pc32/i386/pmap.c
sys/platform/pc64/x86_64/pmap.c
sys/platform/vkernel/platform/pmap.c
sys/platform/vkernel64/platform/pmap.c

index 87d890d..841b068 100644 (file)
@@ -2569,6 +2569,13 @@ pmap_object_init_pt_callback(vm_page_t p, void *data)
                vmstats.v_free_count < vmstats.v_free_reserved) {
                    return(-1);
        }
+
+       /*
+        * Ignore list markers and ignore pages we cannot instantly
+        * busy (while holding the object token).
+        */
+       if (p->flags & PG_MARKER)
+               return 0;
        if (vm_page_busy_try(p, TRUE))
                return 0;
        if (((p->valid & VM_PAGE_BITS_ALL) == VM_PAGE_BITS_ALL) &&
index 83f73b3..0023cdc 100644 (file)
@@ -3276,6 +3276,13 @@ pmap_object_init_pt_callback(vm_page_t p, void *data)
                vmstats.v_free_count < vmstats.v_free_reserved) {
                    return(-1);
        }
+
+       /*
+        * Ignore list markers and ignore pages we cannot instantly
+        * busy (while holding the object token).
+        */
+       if (p->flags & PG_MARKER)
+               return 0;
        if (vm_page_busy_try(p, TRUE))
                return 0;
        if (((p->valid & VM_PAGE_BITS_ALL) == VM_PAGE_BITS_ALL) &&
index 44b6fe3..7ca3a0e 100644 (file)
@@ -2126,6 +2126,13 @@ pmap_object_init_pt_callback(vm_page_t p, void *data)
                vmstats.v_free_count < vmstats.v_free_reserved) {
                    return(-1);
        }
+
+       /*
+        * Ignore list markers and ignore pages we cannot instantly
+        * busy (while holding the object token).
+        */
+       if (p->flags & PG_MARKER)
+               return 0;
        if (vm_page_busy_try(p, TRUE))
                return 0;
        if (((p->valid & VM_PAGE_BITS_ALL) == VM_PAGE_BITS_ALL) &&
index 38938d6..e47d2c7 100644 (file)
@@ -2546,6 +2546,13 @@ pmap_object_init_pt_callback(vm_page_t p, void *data)
                vmstats.v_free_count < vmstats.v_free_reserved) {
                    return(-1);
        }
+
+       /*
+        * Ignore list markers and ignore pages we cannot instantly
+        * busy (while holding the object token).
+        */
+       if (p->flags & PG_MARKER)
+               return 0;
        if (vm_page_busy_try(p, TRUE))
                return 0;
        if (((p->valid & VM_PAGE_BITS_ALL) == VM_PAGE_BITS_ALL) &&