summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_subr.c
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2004-11-03 20:17:31 +0000
committeralc <alc@FreeBSD.org>2004-11-03 20:17:31 +0000
commit25b80a64b9fc30297401a041a69a8229872b01c4 (patch)
tree424cbe6b795ce744b46e7a81db98175896cc5a16 /sys/kern/kern_subr.c
parentd083dba3a2fbaeb254502ed1ca0893eb4a5aae14 (diff)
downloadFreeBSD-src-25b80a64b9fc30297401a041a69a8229872b01c4.zip
FreeBSD-src-25b80a64b9fc30297401a041a69a8229872b01c4.tar.gz
The synchronization provided by vm object locking has eliminated the
need for most calls to vm_page_busy(). Specifically, most calls to vm_page_busy() occur immediately prior to a call to vm_page_remove(). In such cases, the containing vm object is locked across both calls. Consequently, the setting of the vm page's PG_BUSY flag is not even visible to other threads that are following the synchronization protocol. This change (1) eliminates the calls to vm_page_busy() that immediately precede a call to vm_page_remove() or functions, such as vm_page_free() and vm_page_rename(), that call it and (2) relaxes the requirement in vm_page_remove() that the vm page's PG_BUSY flag is set. Now, the vm page's PG_BUSY flag is set only when the vm object lock is released while the vm page is still in transition. Typically, this is when it is undergoing I/O.
Diffstat (limited to 'sys/kern/kern_subr.c')
-rw-r--r--sys/kern/kern_subr.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/sys/kern/kern_subr.c b/sys/kern/kern_subr.c
index cf09244..1d55b44 100644
--- a/sys/kern/kern_subr.c
+++ b/sys/kern/kern_subr.c
@@ -97,7 +97,6 @@ vm_pgmoveco(vm_map_t mapa, vm_object_t srcobj, vm_offset_t kaddr,
do
vm_page_lock_queues();
while (vm_page_sleep_if_busy(user_pg, 1, "vm_pgmoveco"));
- vm_page_busy(user_pg);
pmap_remove_all(user_pg);
vm_page_free(user_pg);
} else
@@ -114,7 +113,6 @@ vm_pgmoveco(vm_map_t mapa, vm_object_t srcobj, vm_offset_t kaddr,
panic("vm_pgmoveco: renaming busy page");
}
kpindex = kern_pg->pindex;
- vm_page_busy(kern_pg);
vm_page_rename(kern_pg, uobject, upindex);
vm_page_flag_clear(kern_pg, PG_BUSY);
kern_pg->valid = VM_PAGE_BITS_ALL;
OpenPOWER on IntegriCloud