From: Matthew Dillon Date: Tue, 29 Nov 2011 06:08:40 +0000 (-0800) Subject: kernel - Check PG_MARKER in pmap_object_init_pt_callback() X-Git-Tag: v3.0.0~541 X-Git-Url: http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/0d987a03063a07a124553c94d2bbfe9c46852f18 kernel - Check PG_MARKER in pmap_object_init_pt_callback() * 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. --- diff --git a/sys/platform/pc32/i386/pmap.c b/sys/platform/pc32/i386/pmap.c index 87d890d..841b068 100644 --- a/sys/platform/pc32/i386/pmap.c +++ b/sys/platform/pc32/i386/pmap.c @@ -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) && diff --git a/sys/platform/pc64/x86_64/pmap.c b/sys/platform/pc64/x86_64/pmap.c index 83f73b3..0023cdc 100644 --- a/sys/platform/pc64/x86_64/pmap.c +++ b/sys/platform/pc64/x86_64/pmap.c @@ -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) && diff --git a/sys/platform/vkernel/platform/pmap.c b/sys/platform/vkernel/platform/pmap.c index 44b6fe3..7ca3a0e 100644 --- a/sys/platform/vkernel/platform/pmap.c +++ b/sys/platform/vkernel/platform/pmap.c @@ -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) && diff --git a/sys/platform/vkernel64/platform/pmap.c b/sys/platform/vkernel64/platform/pmap.c index 38938d6..e47d2c7 100644 --- a/sys/platform/vkernel64/platform/pmap.c +++ b/sys/platform/vkernel64/platform/pmap.c @@ -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) &&