Date: Wed, 21 Jun 2017 18:54:28 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320202 - head/sys/vm Message-ID: <201706211854.v5LIsTup081093@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201706211854.v5LIsTup081093>