Re: [patch 09/11 -mmotm] oom: return vm size of oom killed task

From: Andrew Morton
Date: Mon May 11 2009 - 17:43:06 EST


On Sun, 10 May 2009 15:07:23 -0700 (PDT)
David Rientjes <rientjes@xxxxxxxxxx> wrote:

> It's not optimal to continuously loop in the page allocator if the oom
> killer fails to kill a task.

Ambiguous. This means either "selected a task but failed to kill it"
or "failed to select any task to kill".

> Thus, it's necessary to report how many
> pages may be freed when the task finally exits to determine if any
> progress has been made.

>From this I infer that you're referring to the first case.

Under which circumstances can this happen? Should we just go on and
select another process?

> This also changes the TIF_MEMDIE exception in select_bad_process(). If
> a task is found with this thread flag set, yet it has already detached
> its memory, then an additional task is chosen since we are still out of
> memory.

hm, that was fairly dumb of us.

But what state is this task in? Has it actually returned all its
memory to the page allocator, or is its memory in some limbo state? If
so, what is that state and why did it happen?

> total_vm is used instead of the file and anon rss since this is what the
> badness scoring heuristic is based on and it may be possible to oom kill
> a task with no rss causing the page allocator to believe no progress has
> been made.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/