Date: Tue, 12 Apr 2005 11:37:52 -0700 (PDT) From: "ALeine" <aleine@austrosearch.net> To: marcolz@stack.nl Cc: freebsd-hackers@freebsd.org Subject: Re: kernel killing processes when out of swap Message-ID: <200504121837.j3CIbqnh022760@marlena.vvi.at>
next in thread | raw e-mail | index | archive | help
marcolz@stack.nl wrote: > On Tue, Apr 12, 2005 at 06:46:45PM +0200, Dag-Erling Smrgrav > wrote: > > There is no "large process detection". The first process that > > tries to fault in a new page after the system runs out of swap > > gets killed. > > Are you suggesting that vm_pageout_pmap_collect() is no longer in > use ? > > That has a FOREACH_PROC_IN_SYSTEM(p) ... find biggest unlocked > ... > kill-kill-kill... The largest process gets killed in vm_pageout_scan() according to the latest sources: http://fxr.watson.org/fxr/source/vm/vm_pageout.c#L1168 1168 /* 1169 * If we are critically low on one of RAM or swap and low on 1170 * the other, kill the largest process. However, we avoid 1171 * doing this on the first pass in order to give ourselves a 1172 * chance to flush out dirty vnode-backed pages and to allow 1173 * active pages to be moved to the inactive queue and reclaimed. 1174 * 1175 * We keep the process bigproc locked once we find it to keep anyone 1176 * from messing with it; however, there is a possibility of 1177 * deadlock if process B is bigproc and one of it's child processes 1178 * attempts to propagate a signal to B while we are waiting for A's 1179 * lock while walking this list. To avoid this, we don't block on 1180 * the process lock but just skip a process if it is already locked. 1181 */ http://fxr.watson.org/fxr/source/vm/vm_pageout.c?v=RELENG4#L1112 1112 /* 1113 * If we are out of swap and were not able to reach our paging 1114 * target, kill the largest process. 1115 */ ALeine ___________________________________________________________________ WebMail FREE http://mail.austrosearch.net
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200504121837.j3CIbqnh022760>