Messages in this thread | | | Date | Mon, 22 Feb 2010 12:59:15 -0800 (PST) | From | David Rientjes <> | Subject | Re: [patch -mm 4/9 v2] oom: remove compulsory panic_on_oom mode |
| |
On Mon, 22 Feb 2010, Daisuke Nishimura wrote:
> hmm, I can agree with you. But I think we need some trick to distinguish normal VM_FAULT_OOM > and memcg's VM_FAULT_OOM(the current itself was killed by memcg's oom, so exited the retry) > at mem_cgroup_oom_called() to avoid the system from panic when panic_on_oom is enabled. > (Mark the task which is being killed by memcg's oom ?). >
pagefault_out_of_memory() should use mem_cgroup_from_task(current) and then call mem_cgroup_out_of_memory() when it's non-NULL. select_bad_process() will return ERR_PTR(-1UL) if there is an already oom killed task attached to the memcg, so we can use that to avoid the panic_on_oom. The setting of that sysctl doesn't imply that we can't scan the tasklist, it simply means we can't kill anything as a result of an oom.
| |