Re: [patch] mm, oom: allow exiting threads to have access to memory reserves

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

 



On Thu, 1 Nov 2012 14:58:18 -0700 (PDT)
David Rientjes <rientjes@xxxxxxxxxx> wrote:

> Exiting threads, those with PF_EXITING set, can pagefault and require 
> memory before they can make forward progress.  This happens, for instance, 
> when a process must fault task->robust_list, a userspace structure, before 
> detaching its memory.
> 
> These threads also aren't guaranteed to get access to memory reserves 
> unless oom killed or killed from userspace.  The oom killer won't grant 
> memory reserves if other threads are also exiting other than current and 
> stalling at the same point.  This prevents needlessly killing processes 
> when others are already exiting.
> 
> Instead of special casing all the possible sitations between PF_EXITING 
> getting set and a thread detaching its mm where it may allocate memory, 
> which probably wouldn't get updated when a change is made to the exit 
> path, the solution is to give all exiting threads access to memory 
> reserves if they call the oom killer.  This allows them to quickly 
> allocate, detach its mm, and free the memory it represents.

Seems very sensible.

> Acked-by: Minchan Kim <minchan@xxxxxxxxxx>
> Tested-by: Luigi Semenzato <semenzato@xxxxxxxxxx>

What did Luigi actually test?  Was there some reproducible bad behavior
which this patch fixes?



--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  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]