diff options
author | alc <alc@FreeBSD.org> | 2007-02-15 05:43:38 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2007-02-15 05:43:38 +0000 |
commit | 3e7d1b7ebd5855848ef2b1db847372eb38b16fd5 (patch) | |
tree | 7e8e81255ba0314260d7f29ad7d3bbb5416f68f9 /sys/vm | |
parent | c81388536cb38fe6c9cd266d948d1accdb679fa0 (diff) | |
download | FreeBSD-src-3e7d1b7ebd5855848ef2b1db847372eb38b16fd5.zip FreeBSD-src-3e7d1b7ebd5855848ef2b1db847372eb38b16fd5.tar.gz |
Relax the page queue lock assertions in vm_page_remove() and
vm_page_free_toq() to account for recent changes that allow
vm_page_free_toq() to be called on some pages without the page queues lock
being held, specifically, pages that are not contained in a vm object and
not a member of a page queue. (Examples of such pages include page table
pages, pv entry pages, and uma small alloc pages.)
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/vm_page.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 08c13e1..89bbc0a 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -691,7 +691,6 @@ vm_page_remove(vm_page_t m) vm_object_t object; vm_page_t root; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); if ((object = m->object) == NULL) return; VM_OBJECT_LOCK_ASSERT(object, MA_OWNED); @@ -699,6 +698,7 @@ vm_page_remove(vm_page_t m) m->oflags &= ~VPO_BUSY; vm_page_flash(m); } + mtx_assert(&vm_page_queue_mtx, MA_OWNED); /* * Now remove from the object's list of backed pages. @@ -1101,7 +1101,8 @@ vm_page_free_toq(vm_page_t m) { struct vpgqueues *pq; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + if (VM_PAGE_GETQUEUE(m) != PQ_NONE) + mtx_assert(&vm_page_queue_mtx, MA_OWNED); KASSERT(!pmap_page_is_mapped(m), ("vm_page_free_toq: freeing mapped page %p", m)); cnt.v_tfree++; |