svn commit: r336984 - head/sys/vm
Alan Cox
alc at FreeBSD.org
Tue Jul 31 17:41:49 UTC 2018
Author: alc
Date: Tue Jul 31 17:41:48 2018
New Revision: 336984
URL: https://svnweb.freebsd.org/changeset/base/336984
Log:
Allow vm object coalescing to occur in the midst of a vm object when the
OBJ_ONEMAPPING flag is set. In other words, allow recycling of existing
but unused subranges of a vm object when the OBJ_ONEMAPPING flag is set.
Such situations are increasingly common with jemalloc >= 5.0. This
change has the expected effect of reducing the number of vm map entry and
object allocations and increasing the number of superpage promotions.
Reviewed by: kib, markj
Tested by: pho
MFC after: 6 weeks
Differential Revision: https://reviews.freebsd.org/D16501
Modified:
head/sys/vm/vm_object.c
Modified: head/sys/vm/vm_object.c
==============================================================================
--- head/sys/vm/vm_object.c Tue Jul 31 17:18:58 2018 (r336983)
+++ head/sys/vm/vm_object.c Tue Jul 31 17:41:48 2018 (r336984)
@@ -2142,8 +2142,9 @@ vm_object_coalesce(vm_object_t prev_object, vm_ooffset
next_size >>= PAGE_SHIFT;
next_pindex = OFF_TO_IDX(prev_offset) + prev_size;
- if ((prev_object->ref_count > 1) &&
- (prev_object->size != next_pindex)) {
+ if (prev_object->ref_count > 1 &&
+ prev_object->size != next_pindex &&
+ (prev_object->flags & OBJ_ONEMAPPING) == 0) {
VM_OBJECT_WUNLOCK(prev_object);
return (FALSE);
}
More information about the svn-src-head
mailing list