Messages in this thread | | | Date | Fri, 21 Nov 2008 18:58:29 +0900 | From | KAMEZAWA Hiroyuki <> | Subject | [PATCH 0/2] memcg: fix oom handling |
| |
Li Zefan reported
(a) This goes dead lock: == #echo 0 > (...)/01/memory.limit_in_bytes #set memcg's limit to 0, #echo $$ > (...)/01/memory.tasks #move task # do something... ==
(b) seems to be dead lock == #echo 40k > (...)/01/memory.limit_in_bytes #set memcg's limit to 0, #echo $$ > (...)/01/memory.tasks #move task # do something... ==
I think (a) is BUG. (b) is just slow down. (you can see pgpgin/pgpgout count is increasing in (B).)
This patch set is for handling (a). Li-san, could you check ? This works well in my environment.(means OOM-Killer is called in proper way.)
[1/2].... current mmotm has pagefault_out_of_memory() but this doesn't consider memcg. When memcg hit limits in page_fault and panic_on_oom is set, the kernel panics. This tries to fix that. (See patches/mm-invoke-oom-killer-from-page-fault.patch)
[2/2].... fixes wrong logic of check_under_limit.
Anyway, it seems hierarchy support is *not* enough in OOM handler. Balbir, could you check it ? I think "a bad process in hierarchy rather than memcg" should be killed.
Thanks, -Kame
| |