lkml.org 
[lkml]   [2020]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [patch] mm, oom: prevent soft lockup on memcg oom for UP systems
From
Date
On 2020/03/14 7:01, David Rientjes wrote:
> The entire issue is that the victim never gets a chance to run because the
> allocator doesn't give it a chance to run on an UP system. Your patch is
> broken because if the victim is current, you've lost your golden
> opportunity to actually exit and ceded control to the allocator that will
> now starve the victim.
>

I still cannot understand. There is no need to give CPU time to OOM victims.
We just need to give CPU time to the OOM reaper kernel thread till the OOM
reaper kernel thread sets MMF_OOM_SKIP to OOM victims. If current thread is
an OOM victim, schedule_timeout_killable(1) will give other threads (including
the OOM reaper kernel thread) CPU time to run. That is similar with your
cond_resched() patch (except that cond_resched() might fail to give other
threads CPU time to run if current thread has realtime priority), isn't it?

So, please explain the mechanism why cond_resched() works but
schedule_timeout_killable(1) cannot work.

\
 
 \ /
  Last update: 2020-03-14 00:16    [W:0.068 / U:7.696 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site