From 3d6ba4564bf239ad99f50088d7cad2ad6bc90092 Mon Sep 17 00:00:00 2001 From: dillon Date: Sat, 9 Jun 2001 18:06:58 +0000 Subject: Two fixes to the out-of-swap process termination code. First, start killing processes a little earlier to avoid a deadlock. Second, when calculating the 'largest process' do not just count RSS. Instead count the RSS + SWAP used by the process. Without this the code tended to kill small inconsequential processes like, oh, sshd, rather then one of the many 'eatmem 200MB' I run on a whim :-). This fix has been extensively tested on -stable and somewhat tested on -current and will be MFCd in a few days. Shamed into fixing this by: ps --- sys/vm/vm_map.h | 1 + 1 file changed, 1 insertion(+) (limited to 'sys/vm/vm_map.h') diff --git a/sys/vm/vm_map.h b/sys/vm/vm_map.h index 241a80c..5ea3ccf 100644 --- a/sys/vm/vm_map.h +++ b/sys/vm/vm_map.h @@ -365,6 +365,7 @@ int vm_uiomove __P((vm_map_t, vm_object_t, off_t, int, vm_offset_t, int *)); void vm_freeze_copyopts __P((vm_object_t, vm_pindex_t, vm_pindex_t)); int vm_map_stack __P((vm_map_t, vm_offset_t, vm_size_t, vm_prot_t, vm_prot_t, int)); int vm_map_growstack __P((struct proc *p, vm_offset_t addr)); +int vmspace_swap_count __P((struct vmspace *vmspace)); #endif #endif /* _VM_MAP_ */ -- cgit v1.1