summaryrefslogtreecommitdiffstats
path: root/sys/vm
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2007-02-15 05:43:38 +0000
committeralc <alc@FreeBSD.org>2007-02-15 05:43:38 +0000
commit3e7d1b7ebd5855848ef2b1db847372eb38b16fd5 (patch)
tree7e8e81255ba0314260d7f29ad7d3bbb5416f68f9 /sys/vm
parentc81388536cb38fe6c9cd266d948d1accdb679fa0 (diff)
downloadFreeBSD-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.c5
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++;
OpenPOWER on IntegriCloud