From fc8a5bc419be7f957bbf8bf9e3b3a1a081ec1af1 Mon Sep 17 00:00:00 2001 From: alc Date: Sun, 10 Nov 2002 07:12:04 +0000 Subject: When prot is VM_PROT_NONE, call pmap_page_protect() directly rather than indirectly through vm_page_protect(). The one remaining page flag that is updated by vm_page_protect() is already being updated by our various pmap implementations. Note: A later commit will similarly change the VM_PROT_READ case and eliminate vm_page_protect(). --- sys/vm/vm_pageout.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sys/vm/vm_pageout.c') diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c index 14d058e..00569a0 100644 --- a/sys/vm/vm_pageout.c +++ b/sys/vm/vm_pageout.c @@ -512,7 +512,7 @@ vm_pageout_object_deactivate_pages(map, object, desired, map_remove_only) if ((p->flags & PG_REFERENCED) == 0) { p->act_count -= min(p->act_count, ACT_DECLINE); if (!remove_mode && (vm_pageout_algorithm || (p->act_count == 0))) { - vm_page_protect(p, VM_PROT_NONE); + pmap_page_protect(p, VM_PROT_NONE); vm_page_deactivate(p); } else { vm_pageq_requeue(p); @@ -525,7 +525,7 @@ vm_pageout_object_deactivate_pages(map, object, desired, map_remove_only) vm_pageq_requeue(p); } } else if (p->queue == PQ_INACTIVE) { - vm_page_protect(p, VM_PROT_NONE); + pmap_page_protect(p, VM_PROT_NONE); } p = next; } @@ -618,7 +618,7 @@ vm_pageout_page_free(vm_page_t m) { if (type == OBJT_SWAP || type == OBJT_DEFAULT) vm_object_reference(object); vm_page_busy(m); - vm_page_protect(m, VM_PROT_NONE); + pmap_page_protect(m, VM_PROT_NONE); vm_page_free(m); cnt.v_dfree++; if (type == OBJT_SWAP || type == OBJT_DEFAULT) @@ -1043,7 +1043,7 @@ rescan0: m->act_count == 0) { page_shortage--; if (m->object->ref_count == 0) { - vm_page_protect(m, VM_PROT_NONE); + pmap_page_protect(m, VM_PROT_NONE); if (m->dirty == 0) vm_page_cache(m); else @@ -1278,7 +1278,7 @@ vm_pageout_page_stats() * operations would be higher than the value * of doing the operation. */ - vm_page_protect(m, VM_PROT_NONE); + pmap_page_protect(m, VM_PROT_NONE); vm_page_deactivate(m); } else { m->act_count -= min(m->act_count, ACT_DECLINE); -- cgit v1.1