diff options
author | alc <alc@FreeBSD.org> | 2004-03-02 08:25:58 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2004-03-02 08:25:58 +0000 |
commit | 163a9eabd15682886036ee17e7bf50276cfadc44 (patch) | |
tree | ef9bbcfe7b4b5242299d8ccd4cc46be20dac0bb7 /sys/vm/vm_page.c | |
parent | 1ae35df34955572c1479f39a97b240244c97cc44 (diff) | |
download | FreeBSD-src-163a9eabd15682886036ee17e7bf50276cfadc44.zip FreeBSD-src-163a9eabd15682886036ee17e7bf50276cfadc44.tar.gz |
Modify contigmalloc1() so that the free page queues lock is not held when
vm_page_free() is called. The problem with holding this lock is that it is
a spin lock and vm_page_free() may attempt the acquisition of a different
default-type lock.
Diffstat (limited to 'sys/vm/vm_page.c')
-rw-r--r-- | sys/vm/vm_page.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 853178a..ae1673a 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -206,12 +206,11 @@ vm_page_startup(vm_offset_t starta, vm_offset_t enda, vm_offset_t vaddr) end = phys_avail[biggestone+1]; /* - * Initialize the locks. Recursive acquisition of the vm page - * queue free mutex begins in contigmalloc1(). + * Initialize the locks. */ mtx_init(&vm_page_queue_mtx, "vm page queue mutex", NULL, MTX_DEF); mtx_init(&vm_page_queue_free_mtx, "vm page queue free mutex", NULL, - MTX_RECURSE | MTX_SPIN); + MTX_SPIN); /* * Initialize the queue headers for the free queue, the active queue |