Date: Mon, 16 Nov 2015 05:52:04 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290915 - head/sys/vm Message-ID: <201511160552.tAG5q4a5061065@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Mon Nov 16 05:52:04 2015 New Revision: 290915 URL: https://svnweb.freebsd.org/changeset/base/290915 Log: VM daemon works in parallel with the pagedaemon threads, and, among other actions, swaps out kernel stacks of the processes. On the other hand, currentl OOM logic which selects a process to kill in the critical condition, skips process with swapped-out thread. Under some loads, this results in the big(gest) process being ignored by OOM. Do not skip a process which has inhibited thread due to the swap-out, in the OOM selection loop. Note that killing such process requires the thread stack page-in, but sometimes this is the only way to recover. Reported and tested by: pho Reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 3 weeks Modified: head/sys/vm/vm_pageout.c Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Mon Nov 16 05:38:40 2015 (r290914) +++ head/sys/vm/vm_pageout.c Mon Nov 16 05:52:04 2015 (r290915) @@ -1554,7 +1554,8 @@ vm_pageout_oom(int shortage) if (!TD_ON_RUNQ(td) && !TD_IS_RUNNING(td) && !TD_IS_SLEEPING(td) && - !TD_IS_SUSPENDED(td)) { + !TD_IS_SUSPENDED(td) && + !TD_IS_SWAPPED(td)) { thread_unlock(td); breakout = 1; break;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201511160552.tAG5q4a5061065>