From 1d3a1e16a9c6522839f64e16d213c6afef1a5d35 Mon Sep 17 00:00:00 2001 From: dillon Date: Sun, 24 Jan 1999 01:06:31 +0000 Subject: [PATCH] It is possible for a page in the cache to be busy. vm_pageout.c was not checking for this condition while it tried to free cache pages. Fixed. --- sys/vm/vm_pageout.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c index b5f4f470afdb..29b46111f2bd 100644 --- a/sys/vm/vm_pageout.c +++ b/sys/vm/vm_pageout.c @@ -65,7 +65,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: vm_pageout.c,v 1.130 1999/01/21 08:29:12 dillon Exp $ + * $Id: vm_pageout.c,v 1.131 1999/01/21 10:12:54 dillon Exp $ */ /* @@ -1082,6 +1082,10 @@ vm_pageout_scan() m = vm_page_list_find(PQ_CACHE, cache_rover); if (!m) break; + if ((m->flags & PG_BUSY) || m->busy || m->hold_count || m->wire_count) { + vm_page_deactivate(m); + continue; + } cache_rover = (cache_rover + PQ_PRIME2) & PQ_L2_MASK; vm_pageout_page_free(m); cnt.v_dfree++;