When waiting for the busy page, do not unlock the object unless unlock

cannot be avoided.

Reviewed by:	alc
MFC after:	1 week
This commit is contained in:
Konstantin Belousov 2010-05-20 08:51:01 +00:00
parent e7493cfc51
commit a6e38685f3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=208340

View File

@ -340,9 +340,13 @@ RetryFault:;
vm_page_flag_set(fs.m, PG_REFERENCED);
vm_page_unlock_queues();
vm_page_unlock(fs.m);
VM_OBJECT_UNLOCK(fs.object);
if (fs.object != fs.first_object) {
VM_OBJECT_LOCK(fs.first_object);
if (!VM_OBJECT_TRYLOCK(
fs.first_object)) {
VM_OBJECT_UNLOCK(fs.object);
VM_OBJECT_LOCK(fs.first_object);
VM_OBJECT_LOCK(fs.object);
}
vm_page_lock(fs.first_m);
vm_page_free(fs.first_m);
vm_page_unlock(fs.first_m);
@ -351,7 +355,6 @@ RetryFault:;
fs.first_m = NULL;
}
unlock_map(&fs);
VM_OBJECT_LOCK(fs.object);
if (fs.m == vm_page_lookup(fs.object,
fs.pindex)) {
vm_page_sleep_if_busy(fs.m, TRUE,