Date: Sat, 23 Jul 2016 21:15:40 +0000 (UTC) From: Alan Cox <alc@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303246 - stable/10/sys/vm Message-ID: <201607232115.u6NLFfLs023957@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: alc Date: Sat Jul 23 21:15:40 2016 New Revision: 303246 URL: https://svnweb.freebsd.org/changeset/base/303246 Log: MFC r303101 Add a comment describing the 'fast path' that was introduced in r270011. Modified: stable/10/sys/vm/vm_fault.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_fault.c ============================================================================== --- stable/10/sys/vm/vm_fault.c Sat Jul 23 21:04:53 2016 (r303245) +++ stable/10/sys/vm/vm_fault.c Sat Jul 23 21:15:40 2016 (r303246) @@ -353,6 +353,15 @@ RetryFault:; KASSERT((fault_flags & VM_FAULT_WIRE) == 0, ("!wired && VM_FAULT_WIRE")); + /* + * Try to avoid lock contention on the top-level object through + * special-case handling of some types of page faults, specifically, + * those that are both (1) mapping an existing page from the top- + * level object and (2) not having to mark that object as containing + * dirty pages. Under these conditions, a read lock on the top-level + * object suffices, allowing multiple page faults of a similar type to + * run in parallel on the same top-level object. + */ if (fs.vp == NULL /* avoid locked vnode leak */ && (fault_flags & (VM_FAULT_WIRE | VM_FAULT_DIRTY)) == 0 && /* avoid calling vm_object_set_writeable_dirty() */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201607232115.u6NLFfLs023957>