diff options
author | dyson <dyson@FreeBSD.org> | 1996-06-10 00:25:40 +0000 |
---|---|---|
committer | dyson <dyson@FreeBSD.org> | 1996-06-10 00:25:40 +0000 |
commit | c4b13013431d8691d074c756b15d010d26cec001 (patch) | |
tree | 2f39bec8c333cf88db39cb116c77e6b44b36b790 /sys/vm | |
parent | 9a01ae8a2ac59c20e7289665f5d2f9f9a1ec9f19 (diff) | |
download | FreeBSD-src-c4b13013431d8691d074c756b15d010d26cec001.zip FreeBSD-src-c4b13013431d8691d074c756b15d010d26cec001.tar.gz |
Keep the vm_fault/vm_pageout from getting into an "infinite paging loop", by
reserving "cached" pages before waking up the pageout daemon. This will reserve
the faulted page, and keep the system from thrashing itself to death given
this condition.
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/vm_fault.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index d76fcc5..c9a6c8c 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -66,7 +66,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: vm_fault.c,v 1.48 1996/06/01 20:50:57 dyson Exp $ + * $Id: vm_fault.c,v 1.49 1996/06/08 06:48:32 dyson Exp $ */ /* @@ -261,6 +261,7 @@ RetryFault:; while (TRUE) { m = vm_page_lookup(object, pindex); if (m != NULL) { + int queue; /* * If the page is being brought in, wait for it and * then retry. @@ -280,18 +281,21 @@ RetryFault:; goto RetryFault; } + queue = m->queue; + vm_page_unqueue_nowakeup(m); + /* * Mark page busy for other processes, and the pagedaemon. */ - if ((m->queue == PQ_CACHE) && + if ((queue == PQ_CACHE) && (cnt.v_free_count + cnt.v_cache_count) < cnt.v_free_min) { + vm_page_activate(m); UNLOCK_AND_DEALLOCATE; VM_WAIT; goto RetryFault; } m->flags |= PG_BUSY; - vm_page_unqueue_nowakeup(m); if (m->valid && ((m->valid & VM_PAGE_BITS_ALL) != VM_PAGE_BITS_ALL) && |