vm_pageout.c (7090) | vm_pageout.c (7424) |
---|---|
1/* 2 * Copyright (c) 1991 Regents of the University of California. 3 * All rights reserved. 4 * Copyright (c) 1994 John S. Dyson 5 * All rights reserved. 6 * Copyright (c) 1994 David Greenman 7 * All rights reserved. 8 * --- 51 unchanged lines hidden (view full) --- 60 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 61 * School of Computer Science 62 * Carnegie Mellon University 63 * Pittsburgh PA 15213-3890 64 * 65 * any improvements or extensions that they make and grant Carnegie the 66 * rights to redistribute these changes. 67 * | 1/* 2 * Copyright (c) 1991 Regents of the University of California. 3 * All rights reserved. 4 * Copyright (c) 1994 John S. Dyson 5 * All rights reserved. 6 * Copyright (c) 1994 David Greenman 7 * All rights reserved. 8 * --- 51 unchanged lines hidden (view full) --- 60 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 61 * School of Computer Science 62 * Carnegie Mellon University 63 * Pittsburgh PA 15213-3890 64 * 65 * any improvements or extensions that they make and grant Carnegie the 66 * rights to redistribute these changes. 67 * |
68 * $Id: vm_pageout.c,v 1.41 1995/03/12 07:58:29 davidg Exp $ | 68 * $Id: vm_pageout.c,v 1.42 1995/03/16 18:17:28 bde Exp $ |
69 */ 70 71/* 72 * The proverbial page-out daemon. 73 */ 74 75#include <sys/param.h> 76#include <sys/systm.h> --- 490 unchanged lines hidden (view full) --- 567 continue; 568 } 569 vm_page_test_dirty(m); 570 571 if ((m->dirty & m->valid) == 0) { 572 if (m->valid == 0) { 573 pmap_page_protect(VM_PAGE_TO_PHYS(m), VM_PROT_NONE); 574 vm_page_free(m); | 69 */ 70 71/* 72 * The proverbial page-out daemon. 73 */ 74 75#include <sys/param.h> 76#include <sys/systm.h> --- 490 unchanged lines hidden (view full) --- 567 continue; 568 } 569 vm_page_test_dirty(m); 570 571 if ((m->dirty & m->valid) == 0) { 572 if (m->valid == 0) { 573 pmap_page_protect(VM_PAGE_TO_PHYS(m), VM_PROT_NONE); 574 vm_page_free(m); |
575 cnt.v_dfree++; |
|
575 } else { 576 vm_page_cache(m); 577 } 578 } else if (maxlaunder > 0) { 579 int written; 580 581 object = m->object; 582 if ((object->flags & OBJ_DEAD) || !vm_object_lock_try(object)) { --- 105 unchanged lines hidden (view full) --- 688 * We try to maintain some *really* free pages, this allows interrupt 689 * code to be guaranteed space. 690 */ 691 while (cnt.v_free_count < cnt.v_free_reserved) { 692 m = vm_page_queue_cache.tqh_first; 693 if (!m) 694 break; 695 vm_page_free(m); | 576 } else { 577 vm_page_cache(m); 578 } 579 } else if (maxlaunder > 0) { 580 int written; 581 582 object = m->object; 583 if ((object->flags & OBJ_DEAD) || !vm_object_lock_try(object)) { --- 105 unchanged lines hidden (view full) --- 689 * We try to maintain some *really* free pages, this allows interrupt 690 * code to be guaranteed space. 691 */ 692 while (cnt.v_free_count < cnt.v_free_reserved) { 693 m = vm_page_queue_cache.tqh_first; 694 if (!m) 695 break; 696 vm_page_free(m); |
697 cnt.v_dfree++; |
|
696 } 697 698 /* 699 * make sure that we have swap space -- if we are low on memory and 700 * swap -- then kill the biggest process. 701 */ 702 if ((vm_swap_size == 0 || swap_pager_full) && 703 ((cnt.v_free_count + cnt.v_cache_count) < cnt.v_free_min)) { --- 187 unchanged lines hidden --- | 698 } 699 700 /* 701 * make sure that we have swap space -- if we are low on memory and 702 * swap -- then kill the biggest process. 703 */ 704 if ((vm_swap_size == 0 || swap_pager_full) && 705 ((cnt.v_free_count + cnt.v_cache_count) < cnt.v_free_min)) { --- 187 unchanged lines hidden --- |