From: Hugh Dickins <hugh.dickins@tiscali.co.uk>
To: David Rientjes <rientjes@google.com>
Cc: Mel Gorman <mel@csn.ul.ie>,
Andrew Morton <akpm@linux-foundation.org>,
Nick Piggin <npiggin@suse.de>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] page-allocator: Ensure that processes that have been OOM killed exit the page allocator (resend)
Date: Fri, 17 Jul 2009 13:41:04 +0100 (BST) [thread overview]
Message-ID: <Pine.LNX.4.64.0907171337290.3925@sister.anvils> (raw)
In-Reply-To: <alpine.DEB.2.00.0907170326400.18608@chino.kir.corp.google.com>
On Fri, 17 Jul 2009, David Rientjes wrote:
> On Fri, 17 Jul 2009, Mel Gorman wrote:
>
> > Ok, lets go with this patch then. Thanks
> >
>
> Ok, thanks, I'll add that as your acked-by and I'll write a formal patch
> description for it.
>
>
> mm: avoid endless looping for oom killed tasks
>
> If a task is oom killed and still cannot find memory when trying with no
> watermarks, it's better to fail the allocation attempt than to loop
> endlessly. Direct reclaim has already failed and the oom killer will be a
> no-op since current has yet to die, so there is no other alternative for
> allocations that are not __GFP_NOFAIL.
>
> Acked-by: Mel Gorman <mel@csn.ul.ie>
> Signed-off-by: David Rientjes <rientjes@google.com>
This works much better for me than earlier variants (I'm needing to worry
about OOM when KSM has a lot of pages to break COW on; but a large mlock
is a good test) - thanks.
Acked-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>
> ---
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -1789,6 +1789,10 @@ rebalance:
> if (p->flags & PF_MEMALLOC)
> goto nopage;
>
> + /* Avoid allocations with no watermarks from looping endlessly */
> + if (test_thread_flag(TIF_MEMDIE) && !(gfp_mask & __GFP_NOFAIL))
> + goto nopage;
> +
> /* Try direct reclaim and then allocating */
> page = __alloc_pages_direct_reclaim(gfp_mask, order,
> zonelist, high_zoneidx,
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2009-07-17 12:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-15 10:49 Mel Gorman
2009-07-15 20:29 ` David Rientjes
2009-07-15 20:59 ` David Rientjes
2009-07-16 11:03 ` Mel Gorman
2009-07-16 19:14 ` David Rientjes
2009-07-17 9:21 ` Mel Gorman
2009-07-17 10:29 ` David Rientjes
2009-07-17 12:41 ` Hugh Dickins [this message]
2009-07-15 20:30 ` Andrew Morton
2009-07-16 11:05 ` Mel Gorman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0907171337290.3925@sister.anvils \
--to=hugh.dickins@tiscali.co.uk \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mel@csn.ul.ie \
--cc=npiggin@suse.de \
--cc=rientjes@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox