lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.1002231443410.8693@chino.kir.corp.google.com>
Date:	Tue, 23 Feb 2010 14:49:12 -0800 (PST)
From:	David Rientjes <rientjes@...gle.com>
To:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
cc:	Daisuke Nishimura <nishimura@....nes.nec.co.jp>,
	Balbir Singh <balbir@...ux.vnet.ibm.com>, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org
Subject: Re: [RFC][PATCH] memcg: page fault oom improvement v2

On Tue, 23 Feb 2010, KAMEZAWA Hiroyuki wrote:

> Ouch, I missed to add memcontrol.h to quilt's reflesh set..
> This is updated one. Anyway, I'd like to wait for the next mmotm.
> We already have several changes. 
> 

I think it would be better to just remove mem_cgroup_out_of_memory() and 
make it go through out_of_memory() by specifying a non-NULL pointer to a 
struct mem_cgroup.  We don't need the duplication in code that these two 
functions have and then we can begin to have some consistency with how to 
deal with panic_on_oom.

It would be much better to prefer killing current in pagefault oom 
conditions, as the final patch in my oom killer rewrite does, if it is 
killable.  If not, we scan the tasklist and find another suitable 
candidate.  If current is bound to a memcg, we pass that to 
select_bad_process() so that we only kill other tasks from the same 
cgroup.

This allows us to hijack the TIF_MEMDIE bit to detect when there is a 
parallel pagefault oom killing when the oom killer hasn't necessarily been 
invoked to kill a system-wide task (it's simply killing current, by 
default, and giving it access to memory reserves).  Then, we can change 
out_of_memory(), which also now handles memcg oom conditions, to always 
scan the tasklist first (including for mempolicy and cpuset constrained 
ooms), check for any candidates that have TIF_MEMDIE, and return 
ERR_PTR(-1UL) if so.  That catches the parallel pagefault oom conditions 
from needlessly killing memcg tasks.  panic_on_oom would only panic after 
the tasklist scan has completed and returned != ERR_PTR(-1UL), meaning 
pagefault ooms are exempt from that sysctl.

Anyway, do you think it would be possible to rebase on mmotm with my oom 
killer rewrite patches?  They're at 
http://www.kernel.org/pub/linux/kernel/people/rientjes/oom-killer-rewrite
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ