From b5ccee962b195ff7b4706db554bfa8eecf63a9de Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Tue, 23 May 2006 01:21:48 +0000 Subject: [PATCH] The pageout daemon does not usually page out pages it considers active. However, under certain types of heavy memory use it is possible to keep nearly all of a machine's pages marked active. This can result in a degenerate situation where the pageout demon pages out so few pages that it might as well not be operating at all, resulting in a machine lockup. Adjust the pageout daemon to dig into active pages based on its loop counter. This counter will start to go up when the pageout daemon is not able to keep up. The higher counter gets, the more active pages become candidates for paging. We depend on fault-in rate limiting to avoid thrashing to the point of inaccessibility. Also-thanks-to: Peter Holms filesystem and load testing suite (stress2). --- sys/vm/vm_pageout.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c index f857435f97..aa243eb0f1 100644 --- a/sys/vm/vm_pageout.c +++ b/sys/vm/vm_pageout.c @@ -66,7 +66,7 @@ * rights to redistribute these changes. * * $FreeBSD: src/sys/vm/vm_pageout.c,v 1.151.2.15 2002/12/29 18:21:04 dillon Exp $ - * $DragonFly: src/sys/vm/vm_pageout.c,v 1.21 2006/05/06 02:43:15 dillon Exp $ + * $DragonFly: src/sys/vm/vm_pageout.c,v 1.22 2006/05/23 01:21:48 dillon Exp $ */ /* @@ -1068,7 +1068,7 @@ rescan0: m->act_count -= min(m->act_count, ACT_DECLINE); if (vm_pageout_algorithm || m->object->ref_count == 0 || - m->act_count == 0) { + m->act_count < pass) { page_shortage--; if (m->object->ref_count == 0) { vm_page_protect(m, VM_PROT_NONE); -- 2.41.0