Author: kib Date: Thu May 20 08:51:01 2010 New Revision: 208340 URL: http://svn.freebsd.org/changeset/base/208340
Log: When waiting for the busy page, do not unlock the object unless unlock cannot be avoided. Reviewed by: alc MFC after: 1 week Modified: head/sys/vm/vm_fault.c Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Thu May 20 08:43:31 2010 (r208339) +++ head/sys/vm/vm_fault.c Thu May 20 08:51:01 2010 (r208340) @@ -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, _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"