svn commit: r320202 - head/sys/vm
Konstantin Belousov
kib at FreeBSD.org
Wed Jun 21 18:54:30 UTC 2017
Author: kib
Date: Wed Jun 21 18:54:28 2017
New Revision: 320202
URL: https://svnweb.freebsd.org/changeset/base/320202
Log:
Call pmap_copy() only for map entries which have the backing object
instantiated.
Calling pmap_copy() on non-faulted anonymous memory entries is useless.
Noted and reviewed by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Modified:
head/sys/vm/vm_map.c
Modified: head/sys/vm/vm_map.c
==============================================================================
--- head/sys/vm/vm_map.c Wed Jun 21 18:51:30 2017 (r320201)
+++ head/sys/vm/vm_map.c Wed Jun 21 18:54:28 2017 (r320202)
@@ -3239,6 +3239,10 @@ vm_map_copy_entry(
fake_entry->next = curthread->td_map_def_user;
curthread->td_map_def_user = fake_entry;
}
+
+ pmap_copy(dst_map->pmap, src_map->pmap,
+ dst_entry->start, dst_entry->end - dst_entry->start,
+ src_entry->start);
} else {
dst_entry->object.vm_object = NULL;
dst_entry->offset = 0;
@@ -3248,9 +3252,6 @@ vm_map_copy_entry(
*fork_charge += size;
}
}
-
- pmap_copy(dst_map->pmap, src_map->pmap, dst_entry->start,
- dst_entry->end - dst_entry->start, src_entry->start);
} else {
/*
* We don't want to make writeable wired pages copy-on-write.
More information about the svn-src-all
mailing list