diff options
author | alc <alc@FreeBSD.org> | 2006-10-22 21:18:48 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2006-10-22 21:18:48 +0000 |
commit | 5d9c66a3f8fe76b65b02406c551668f4b645abf5 (patch) | |
tree | 43e03c6bedc6aa126229bf727c93fe15277a8a53 | |
parent | cc74fcabb418a714919dc9abc75e57e47b0a058c (diff) | |
download | FreeBSD-src-5d9c66a3f8fe76b65b02406c551668f4b645abf5.zip FreeBSD-src-5d9c66a3f8fe76b65b02406c551668f4b645abf5.tar.gz |
The page queues lock is no longer required by vm_page_busy() or
vm_page_wakeup(). Reduce or eliminate its use accordingly.
-rw-r--r-- | sys/dev/agp/agp.c | 4 | ||||
-rw-r--r-- | sys/kern/kern_exec.c | 4 | ||||
-rw-r--r-- | sys/pci/agp.c | 4 | ||||
-rw-r--r-- | sys/vm/vm_object.c | 2 | ||||
-rw-r--r-- | sys/vm/vm_page.c | 7 |
5 files changed, 5 insertions, 16 deletions
diff --git a/sys/dev/agp/agp.c b/sys/dev/agp/agp.c index 7fdbb73..3b38641 100644 --- a/sys/dev/agp/agp.c +++ b/sys/dev/agp/agp.c @@ -529,17 +529,13 @@ agp_generic_bind_memory(device_t dev, struct agp_memory *mem, * Bail out. Reverse all the mappings * and unwire the pages. */ - vm_page_lock_queues(); vm_page_wakeup(m); - vm_page_unlock_queues(); for (k = 0; k < i + j; k += AGP_PAGE_SIZE) AGP_UNBIND_PAGE(dev, offset + k); goto bad; } } - vm_page_lock_queues(); vm_page_wakeup(m); - vm_page_unlock_queues(); } VM_OBJECT_UNLOCK(mem->am_obj); diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index be7dbe6..e513908 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -829,9 +829,7 @@ exec_map_first_page(imgp) break; if ((ma[i]->oflags & VPO_BUSY) || ma[i]->busy) break; - vm_page_lock_queues(); vm_page_busy(ma[i]); - vm_page_unlock_queues(); } else { ma[i] = vm_page_alloc(object, i, VM_ALLOC_NORMAL); @@ -855,8 +853,8 @@ exec_map_first_page(imgp) } vm_page_lock_queues(); vm_page_hold(ma[0]); - vm_page_wakeup(ma[0]); vm_page_unlock_queues(); + vm_page_wakeup(ma[0]); VM_OBJECT_UNLOCK(object); imgp->firstpage = sf_buf_alloc(ma[0], 0); diff --git a/sys/pci/agp.c b/sys/pci/agp.c index 7fdbb73..3b38641 100644 --- a/sys/pci/agp.c +++ b/sys/pci/agp.c @@ -529,17 +529,13 @@ agp_generic_bind_memory(device_t dev, struct agp_memory *mem, * Bail out. Reverse all the mappings * and unwire the pages. */ - vm_page_lock_queues(); vm_page_wakeup(m); - vm_page_unlock_queues(); for (k = 0; k < i + j; k += AGP_PAGE_SIZE) AGP_UNBIND_PAGE(dev, offset + k); goto bad; } } - vm_page_lock_queues(); vm_page_wakeup(m); - vm_page_unlock_queues(); } VM_OBJECT_UNLOCK(mem->am_obj); diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index c86a2bb..472f254 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -1364,10 +1364,8 @@ vm_object_split(vm_map_entry_t entry) swap_pager_copy(orig_object, new_object, offidxstart, 0); } VM_OBJECT_UNLOCK(orig_object); - vm_page_lock_queues(); TAILQ_FOREACH(m, &new_object->memq, listq) vm_page_wakeup(m); - vm_page_unlock_queues(); VM_OBJECT_UNLOCK(new_object); entry->object.vm_object = new_object; entry->offset = 0LL; diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 0c971c5..c191d60 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -1472,12 +1472,13 @@ retrylookup: return (NULL); goto retrylookup; } else { - vm_page_lock_queues(); - if (allocflags & VM_ALLOC_WIRED) + if ((allocflags & VM_ALLOC_WIRED) != 0) { + vm_page_lock_queues(); vm_page_wire(m); + vm_page_unlock_queues(); + } if ((allocflags & VM_ALLOC_NOBUSY) == 0) vm_page_busy(m); - vm_page_unlock_queues(); return (m); } } |