summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_contig.c
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2007-02-05 06:02:55 +0000
committeralc <alc@FreeBSD.org>2007-02-05 06:02:55 +0000
commit4881bd38e2f4061efa354e25c1c66cc0275393a7 (patch)
tree637e68f96e2bfd32a294cf1c8e9174af72387c26 /sys/vm/vm_contig.c
parent7925e63ddf2503578b494beaa7b4e98a843ed6d9 (diff)
downloadFreeBSD-src-4881bd38e2f4061efa354e25c1c66cc0275393a7.zip
FreeBSD-src-4881bd38e2f4061efa354e25c1c66cc0275393a7.tar.gz
Change the free page queue lock from a spin mutex to a default (blocking)
mutex. With the demise of Alpha support, there is no longer a reason for it to be a spin mutex.
Diffstat (limited to 'sys/vm/vm_contig.c')
-rw-r--r--sys/vm/vm_contig.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/vm/vm_contig.c b/sys/vm/vm_contig.c
index 1e86998..066b430 100644
--- a/sys/vm/vm_contig.c
+++ b/sys/vm/vm_contig.c
@@ -198,7 +198,7 @@ contigmalloc1(
for (pass = 2; pass >= 0; pass--) {
vm_page_lock_queues();
again0:
- mtx_lock_spin(&vm_page_queue_free_mtx);
+ mtx_lock(&vm_page_queue_free_mtx);
again:
/*
* Find first page in array that is free, within range,
@@ -219,7 +219,7 @@ again:
*/
if ((i == cnt.v_page_count) ||
((VM_PAGE_TO_PHYS(&pga[i]) + size) > high)) {
- mtx_unlock_spin(&vm_page_queue_free_mtx);
+ mtx_unlock(&vm_page_queue_free_mtx);
/*
* Instead of racing to empty the inactive/active
* queues, give up, even with more left to free,
@@ -260,7 +260,7 @@ again1:
goto again;
}
}
- mtx_unlock_spin(&vm_page_queue_free_mtx);
+ mtx_unlock(&vm_page_queue_free_mtx);
for (i = start; i < (start + size / PAGE_SIZE); i++) {
vm_page_t m = &pga[i];
@@ -283,7 +283,7 @@ again1:
VM_OBJECT_UNLOCK(object);
}
}
- mtx_lock_spin(&vm_page_queue_free_mtx);
+ mtx_lock(&vm_page_queue_free_mtx);
for (i = start; i < (start + size / PAGE_SIZE); i++) {
pqtype = pga[i].queue - pga[i].pc;
if (pqtype != PQ_FREE) {
@@ -304,7 +304,7 @@ again1:
m->wire_count = 0;
m->busy = 0;
}
- mtx_unlock_spin(&vm_page_queue_free_mtx);
+ mtx_unlock(&vm_page_queue_free_mtx);
vm_page_unlock_queues();
/*
* We've found a contiguous chunk that meets are requirements.
@@ -368,12 +368,12 @@ vm_contig_unqueue_free(vm_page_t m)
{
int error = 0;
- mtx_lock_spin(&vm_page_queue_free_mtx);
+ mtx_lock(&vm_page_queue_free_mtx);
if ((m->queue - m->pc) == PQ_FREE)
vm_pageq_remove_nowakeup(m);
else
error = EAGAIN;
- mtx_unlock_spin(&vm_page_queue_free_mtx);
+ mtx_unlock(&vm_page_queue_free_mtx);
if (error)
return (error);
m->valid = VM_PAGE_BITS_ALL;
OpenPOWER on IntegriCloud