Re: [patch] oom: prevent unnecessary oom kills or kernel panics

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

 



On Wed, 9 Mar 2011, Oleg Nesterov wrote:

> > Using for_each_process() does not consider threads that have failed to
> > exit after the oom killed parent and, thus, we select another innocent
> > task to kill when we're really just waiting for those threads to exit
> 
> How so? select_bad_process() checks TIF_MEMDIE and returns ERR_PTR()
> if it is set.
> 

TIF_MEMDIE is quite obviously a per-thread flag that only gets set for the 
oom killed task.  That leader may exit and leave behind several other 
threads that cannot be detected in a subsequent oom killer call using 
for_each_process().  We instead want to identify those threads and target 
them as well so that they may die and free memory.

> And, exactly because we use for_each_process() we do not need to check
> other threads. The main thread can't disappear until they all exit.
> 

That's obviously false, otherwise we wouldn't have lots of panics because 
there are no other eligible processes found using for_each_process() yet 
there are eligible threads using do_each_thread().

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
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]