From 62dcdc109bff680aae36f91b62d491c87ef2208e Mon Sep 17 00:00:00 2001 From: thorpej Date: Wed, 7 Jul 1999 21:04:22 +0000 Subject: [PATCH] In the PGO_FREE case of uvm_map_clean()'s amap cleaning, skip wired pages. XXX This should be handled better in the future, probably by marking the XXX page as released, and making uvm_pageunwire() free the page when XXX the wire count on a released page reaches zero. --- sys/uvm/uvm_map.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sys/uvm/uvm_map.c b/sys/uvm/uvm_map.c index 9215f40c00e7..63e43da6266f 100644 --- a/sys/uvm/uvm_map.c +++ b/sys/uvm/uvm_map.c @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_map.c,v 1.61 1999/07/07 06:02:22 thorpej Exp $ */ +/* $NetBSD: uvm_map.c,v 1.62 1999/07/07 21:04:22 thorpej Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -2520,6 +2520,11 @@ uvm_map_clean(map, start, end, flags) continue; case PGO_FREE: + /* XXX skip the page if it's wired */ + if (pg->wire_count != 0) { + simple_unlock(&anon->an_lock); + continue; + } amap_unadd(&entry->aref, offset); refs = --anon->an_ref; simple_unlock(&anon->an_lock);