summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2015-09-27 01:15:17 +0000
committeralc <alc@FreeBSD.org>2015-09-27 01:15:17 +0000
commit88a31859bc3d4aa7ff0ff68863cbf4c83084dca0 (patch)
tree41e3e0724fe2a19ca7f9625e5af7a3f3cef3e418
parentd059c10283c1b9c979f237d20f8944465a2e3f62 (diff)
downloadFreeBSD-src-88a31859bc3d4aa7ff0ff68863cbf4c83084dca0.zip
FreeBSD-src-88a31859bc3d4aa7ff0ff68863cbf4c83084dca0.tar.gz
MFC r287944
Eliminate (many) unnecessary calls to pmap_remove_all().
-rw-r--r--sys/vm/vm_page.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c
index 8024a7c..7d6ce08 100644
--- a/sys/vm/vm_page.c
+++ b/sys/vm/vm_page.c
@@ -3009,7 +3009,8 @@ vm_page_set_invalid(vm_page_t m, int base, int size)
bits = VM_PAGE_BITS_ALL;
else
bits = vm_page_bits(base, size);
- if (m->valid == VM_PAGE_BITS_ALL && bits != 0)
+ if (object->ref_count != 0 && m->valid == VM_PAGE_BITS_ALL &&
+ bits != 0)
pmap_remove_all(m);
KASSERT((bits == 0 && m->valid == VM_PAGE_BITS_ALL) ||
!pmap_page_is_mapped(m),
OpenPOWER on IntegriCloud