[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090805110107.5B97.A69D9226@jp.fujitsu.com>
Date: Wed, 5 Aug 2009 11:29:34 +0900 (JST)
From: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
To: Minchan Kim <minchan.kim@...il.com>
Cc: kosaki.motohiro@...fujitsu.com,
LKML <linux-kernel@...r.kernel.org>,
Paul Menage <menage@...gle.com>,
David Rientjes <rientjes@...gle.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
Rik van Riel <riel@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Oleg Nesterov <oleg@...hat.com>, linux-mm <linux-mm@...ck.org>
Subject: Re: [PATCH 1/4] oom: move oom_adj to signal_struct
Hi
> Hi, Kosaki.
>
> I am so late to invole this thread.
> But let me have a question.
>
> What's advantage of placing oom_adj in singal rather than task ?
> I mean task->oom_adj and task->signal->oom_adj ?
>
> I am sorry if you already discussed it at last threads.
Not sorry. that's very good question.
I'm trying to explain the detailed intention of commit 2ff05b2b4eac
(move oom_adj to mm_struct).
In 2.6.30, OOM logic callflow is here.
__out_of_memory
select_bad_process for each task
badness calculate badness of one task
oom_kill_process search child
oom_kill_task kill target task and mm shared tasks with it
example, process-A have two thread, thread-A and thread-B and it
have very fat memory.
And, each thread have following likes oom property.
thread-A: oom_adj = OOM_DISABLE, oom_score = 0
thread-B: oom_adj = 0, oom_score = very-high
Then, select_bad_process() select thread-B, but oom_kill_task refuse
kill the task because thread-A have OOM_DISABLE.
__out_of_memory() call select_bad_process() again. but select_bad_process()
select the same task. It mean kernel fall in the livelock.
The fact is, select_bad_process() must select killable task. otherwise
OOM logic go into livelock.
Is this enough explanation? thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists