From fc3c1bc471d80b494f7aaf62b4575f495f9e8cfc Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Tue, 24 Jan 2006 07:21:38 +0000 Subject: [PATCH] In vm_page_set_invalid() invalidate all of the page's mappings as soon as any part of the page's contents is invalidated. Submitted by: tegge --- sys/vm/vm_page.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 611be84bf541..c8823648aac2 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -1558,6 +1558,8 @@ vm_page_set_invalid(vm_page_t m, int base, int size) VM_OBJECT_LOCK_ASSERT(m->object, MA_OWNED); bits = vm_page_bits(base, size); mtx_assert(&vm_page_queue_mtx, MA_OWNED); + if (m->valid == VM_PAGE_BITS_ALL && bits != 0) + pmap_remove_all(m); m->valid &= ~bits; m->dirty &= ~bits; m->object->generation++;