lkml.org 
[lkml]   [2011]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 1/2] oom: remove oom_disable_count
On Tue, 30 Aug 2011, Oleg Nesterov wrote:

> > @@ -447,6 +431,9 @@ static int oom_kill_task(struct task_struct *p, struct mem_cgroup *mem)
> > for_each_process(q)
> > if (q->mm == mm && !same_thread_group(q, p) &&
> > !(q->flags & PF_KTHREAD)) {
>
> (I guess this is on top of -mm patch)
>

Yes, it's based on
oom-avoid-killing-kthreads-if-they-assume-the-oom-killed-threads-mm.patch
which I thought would be pushed for the 3.1 rc series, we certainly don't
want to SIGKILL kthreads :)

> > + if (q->signal->oom_score_adj == OOM_SCORE_ADJ_MIN)
> > + continue;
> > +
>
> Afaics, this is the only change apart from "removes mm->oom_disable_count
> entirely", looks reasonable to me.
>

Yeah, it's necessary because this loop in oom_kill_task() kills all
user threads in different thread groups unconditionally if they share the
same mm, so we need to ensure that we aren't sending a SIGKILL to anything
that is actually oom disabled. Before, the check in oom_badness() would
have prevented the task (`p' in this function) from being chosen in the
first place.


\
 
 \ /
  Last update: 2011-08-31 00:09    [W:0.089 / U:0.728 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site