vm_pageout.c (14429) | vm_pageout.c (14531) |
---|---|
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.66 1996/02/22 10:57:37 davidg Exp $ | 68 * $Id: vm_pageout.c,v 1.67 1996/03/09 06:53:27 dyson Exp $ |
69 */ 70 71/* 72 * The proverbial page-out daemon. 73 */ 74 75#include <sys/param.h> 76#include <sys/systm.h> --- 712 unchanged lines hidden (view full) --- 789 /* 790 * make sure that we have swap space -- if we are low on memory and 791 * swap -- then kill the biggest process. 792 */ 793 if ((vm_swap_size == 0 || swap_pager_full) && 794 ((cnt.v_free_count + cnt.v_cache_count) < cnt.v_free_min)) { 795 bigproc = NULL; 796 bigsize = 0; | 69 */ 70 71/* 72 * The proverbial page-out daemon. 73 */ 74 75#include <sys/param.h> 76#include <sys/systm.h> --- 712 unchanged lines hidden (view full) --- 789 /* 790 * make sure that we have swap space -- if we are low on memory and 791 * swap -- then kill the biggest process. 792 */ 793 if ((vm_swap_size == 0 || swap_pager_full) && 794 ((cnt.v_free_count + cnt.v_cache_count) < cnt.v_free_min)) { 795 bigproc = NULL; 796 bigsize = 0; |
797 for (p = (struct proc *) allproc; p != NULL; p = p->p_next) { | 797 for (p = allproc.lh_first; p != 0; p = p->p_list.le_next) { |
798 /* 799 * if this is a system process, skip it 800 */ 801 if ((p->p_flag & P_SYSTEM) || (p->p_pid == 1) || 802 ((p->p_pid < 48) && (vm_swap_size != 0))) { 803 continue; 804 } 805 /* --- 118 unchanged lines hidden (view full) --- 924 swapout_procs(); 925 vm_pageout_req_swapout = 0; 926 } 927 /* 928 * scan the processes for exceeding their rlimits or if 929 * process is swapped out -- deactivate pages 930 */ 931 | 798 /* 799 * if this is a system process, skip it 800 */ 801 if ((p->p_flag & P_SYSTEM) || (p->p_pid == 1) || 802 ((p->p_pid < 48) && (vm_swap_size != 0))) { 803 continue; 804 } 805 /* --- 118 unchanged lines hidden (view full) --- 924 swapout_procs(); 925 vm_pageout_req_swapout = 0; 926 } 927 /* 928 * scan the processes for exceeding their rlimits or if 929 * process is swapped out -- deactivate pages 930 */ 931 |
932 for (p = (struct proc *) allproc; p != NULL; p = p->p_next) { | 932 for (p = allproc.lh_first; p != 0; p = p->p_list.le_next) { |
933 int overage; 934 quad_t limit; 935 vm_offset_t size; 936 937 /* 938 * if this is a system process or if we have already 939 * looked at this process, skip it. 940 */ --- 51 unchanged lines hidden --- | 933 int overage; 934 quad_t limit; 935 vm_offset_t size; 936 937 /* 938 * if this is a system process or if we have already 939 * looked at this process, skip it. 940 */ --- 51 unchanged lines hidden --- |