[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20091215085455.13eb65cc.minchan.kim@barrios-desktop>
Date: Tue, 15 Dec 2009 08:54:55 +0900
From: Minchan Kim <minchan.kim@...il.com>
To: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
Cc: Rik van Riel <riel@...hat.com>, lwoodman@...hat.com,
akpm@...ux-foundation.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, minchan.kim@...il.com
Subject: Re: [PATCH 8/8] mm: Give up allocation if the task have fatal
signal
On Mon, 14 Dec 2009 21:32:58 +0900 (JST)
KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com> wrote:
> In OOM case, almost processes may be in vmscan. There isn't any reason
> the killed process continue allocation. process exiting free lots pages
> rather than greedy vmscan.
>
> Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
> ---
> mm/page_alloc.c | 8 ++++++++
> 1 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index ca9cae1..8a9cbaa 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -1878,6 +1878,14 @@ rebalance:
> goto got_pg;
>
> /*
> + * If the allocation is for userland page and we have fatal signal,
> + * there isn't any reason to continue allocation. instead, the task
> + * should exit soon.
> + */
> + if (fatal_signal_pending(current) && (gfp_mask & __GFP_HIGHMEM))
> + goto nopage;
If we jump nopage, we meets dump_stack and show_mem.
Even, we can meet OOM which might kill innocent process.
> +
> + /*
> * If we failed to make any progress reclaiming, then we are
> * running out of options and have to consider going OOM
> */
> --
> 1.6.5.2
>
>
>
--
Kind regards,
Minchan Kim
--
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