Re: [PATCH] mm, oom: task_will_free_mem(current) should ignore MMF_OOM_SKIP for once.

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

 



Tetsuo Handa wrote:
> Manish Jaggi wrote:
> > Wanted to understand the envisaged effect of this patch
> > - would this patch kill the task fully or it will still take few more 
> > iterations of oom-kill to kill other process to free memory
> > - when I apply this patch I see other tasks getting killed, though I 
> > didnt got panic in initial testing, I saw login process getting killed.
> > So I am not sure if this patch works...
> 
> Thank you for testing. This patch is working as intended.
> 
> This patch (or any other patches) won't wait for the OOM victim (in this case
> oom02) to be fully killed. We don't want to risk OOM lockup situation by waiting
> for the OOM victim to be fully killed. If the OOM reaper kernel thread waits for
> the OOM victim forever, different OOM stress will trigger OOM lockup situation.
> Thus, the OOM reaper kernel thread gives up waiting for the OOM victim as soon as
> memory which can be reclaimed before __mmput() from mmput() from exit_mm() from
> do_exit() is called is reclaimed and sets MMF_OOM_SKIP.
> 
> Other tasks might be getting killed, for threads which task_will_free_mem(current)
> returns false will call select_bad_process() and select_bad_process() will ignore
> existing OOM victims with MMF_OOM_SKIP already set. Compared to older kernels
> which do not have the OOM reaper support, this behavior looks like a regression.
> But please be patient. This behavior is our choice for not to risk OOM lockup
> situation.
> 
> This patch will prevent _all_ threads which task_will_free_mem(current) returns
> true from calling select_bad_process(). And Michal's patch will prevent _most_
> threads which task_will_free_mem(current) returns true from calling select_bad_process().
> Since oom02 has many threads which task_will_free_mem(current) returns true,
> this patch (or Michal's patch) will reduce possibility of killing all threads.
> 

Oh, the last line was confusing.

Since oom02 has many threads which task_will_free_mem(current) returns true,
this patch (or Michal's patch) will reduce possibility of killing other tasks
(i.e. processes other than oom02) by increasing possibility of allocations by
OOM victim threads (i.e. threads in oom02) to succeed.

--
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 OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]
  Powered by Linux