diff options
author | alc <alc@FreeBSD.org> | 2010-05-06 16:39:43 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2010-05-06 16:39:43 +0000 |
commit | 4b98b3d3203f8e23130597b9b6ab9f1487ba69e6 (patch) | |
tree | dfc0fa6f0a9194a6c782ff3251e16f9d16a9aade /sys/sparc64 | |
parent | e6323f71424e4730372914a47d9b7b5f4bb410b4 (diff) | |
download | FreeBSD-src-4b98b3d3203f8e23130597b9b6ab9f1487ba69e6.zip FreeBSD-src-4b98b3d3203f8e23130597b9b6ab9f1487ba69e6.tar.gz |
Push down the page queues lock inside of vm_page_free_toq() and
pmap_page_is_mapped() in preparation for removing page queues locking
around calls to vm_page_free(). Setting aside the assertion that calls
pmap_page_is_mapped(), vm_page_free_toq() now acquires and holds the page
queues lock just long enough to actually add or remove the page from the
paging queues.
Update vm_page_unhold() to reflect the above change.
Diffstat (limited to 'sys/sparc64')
-rw-r--r-- | sys/sparc64/sparc64/pmap.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/sys/sparc64/sparc64/pmap.c b/sys/sparc64/sparc64/pmap.c index daba4b7..0a90b40 100644 --- a/sys/sparc64/sparc64/pmap.c +++ b/sys/sparc64/sparc64/pmap.c @@ -1834,14 +1834,19 @@ boolean_t pmap_page_is_mapped(vm_page_t m) { struct tte *tp; + boolean_t rv; + rv = FALSE; if ((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) != 0) - return (FALSE); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + return (rv); + vm_page_lock_queues(); TAILQ_FOREACH(tp, &m->md.tte_list, tte_link) - if ((tp->tte_data & TD_PV) != 0) - return (TRUE); - return (FALSE); + if ((tp->tte_data & TD_PV) != 0) { + rv = TRUE; + break; + } + vm_page_unlock_queues(); + return (rv); } /* |