Re: [patch -mm v2 04/10] oom: remove special handling for pagefault ooms

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2 Mar 2010 16:53:00 -0800 (PST)
David Rientjes <rientjes@xxxxxxxxxx> wrote:

> On Wed, 3 Mar 2010, KAMEZAWA Hiroyuki wrote:
> 
> > memory_cgroup_out_of_memory() kills a task. and return VM_FAULT_OOM then,
> > page_fault_out_of_memory() kills another task.
> > and cause panic if panic_on_oom=1.
> > 
> 
> If mem_cgroup_out_of_memory() has returned, then it has already killed a 
> task that will have TIF_MEMDIE set and therefore make the VM_FAULT_OOM oom 
> a no-op.  If the oom killed task subsequently returns VM_FAULT_OOM, we 
> better panic because we've fully depleted memory reserves and no future 
> memory freeing is guaranteed.
> 
In patch 01-03, you don't modified panic_on_oom implementation.
And this patch, you don't modified the return code of memcg's charge code.
It still returns -ENOMEM.

Then, VM_FAULT_OOM is returned and page_fault_out_of_memory() calles this
and hit this.

       case CONSTRAINT_NONE:
                if (sysctl_panic_on_oom) {
                        dump_header(NULL, gfp_mask, order, NULL);
                        panic("out of memory. panic_on_oom is selected\n");
                }

The system will panic. A hook, mem_cgroup_oom_called() is for avoiding this.
memcg's oom doesn't mean memory shortage, just means it his limit.

Thanks,
-Kame

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]