diff options
author | alc <alc@FreeBSD.org> | 2016-07-23 21:15:40 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2016-07-23 21:15:40 +0000 |
commit | fc8d394fa28ef4f4fb39639192e718620ef9699b (patch) | |
tree | b84e9d7dd7a306e163fd757f8265d8f93004f9de /sys/vm/vm_fault.c | |
parent | 876fac0db641623bff3fda866239798202e6a0d3 (diff) | |
download | FreeBSD-src-fc8d394fa28ef4f4fb39639192e718620ef9699b.zip FreeBSD-src-fc8d394fa28ef4f4fb39639192e718620ef9699b.tar.gz |
MFC r303101
Add a comment describing the 'fast path' that was introduced in r270011.
Diffstat (limited to 'sys/vm/vm_fault.c')
-rw-r--r-- | sys/vm/vm_fault.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index d65cda2..909f57f 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -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() */ |