Date: Thu, 8 Aug 2013 06:15:59 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r254090 - stable/9/sys/vm Message-ID: <201308080615.r786Fxw7011122@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Thu Aug 8 06:15:58 2013 New Revision: 254090 URL: http://svnweb.freebsd.org/changeset/base/254090 Log: MFC r253191: The vm_fault() should not be allowed to proceed on the map entry which is being wired now. The entry wired count is changed to non-zero in advance, before the map lock is dropped. This makes the vm_fault() to perceive the entry as wired, and breaks the fragment which moves the wire count from the shadowed page, to the upper page, making the code unwiring non-wired page. On the other hand, the vm_fault() calls from vm_fault_wire() should be allowed to proceed, so only drain MAP_ENTRY_IN_TRANSITION from vm_fault() when wiring_thread is not current. Modified: stable/9/sys/vm/vm_fault.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/vm/vm_fault.c ============================================================================== --- stable/9/sys/vm/vm_fault.c Thu Aug 8 06:12:29 2013 (r254089) +++ stable/9/sys/vm/vm_fault.c Thu Aug 8 06:15:58 2013 (r254090) @@ -286,6 +286,19 @@ RetryFault:; (u_long)vaddr); } + if (fs.entry->eflags & MAP_ENTRY_IN_TRANSITION && + fs.entry->wiring_thread != curthread) { + vm_map_unlock_read(fs.map); + vm_map_lock(fs.map); + if (vm_map_lookup_entry(fs.map, vaddr, &fs.entry) && + (fs.entry->eflags & MAP_ENTRY_IN_TRANSITION)) { + fs.entry->eflags |= MAP_ENTRY_NEEDS_WAKEUP; + vm_map_unlock_and_wait(fs.map, 0); + } else + vm_map_unlock(fs.map); + goto RetryFault; + } + /* * Make a reference to this object to prevent its disposal while we * are messing with it. Once we have the reference, the map is free
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308080615.r786Fxw7011122>