mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Minchan Kim <minchan.kim@gmail.com>
To: Mel Gorman <mel@csn.ul.ie>
Cc: David Rientjes <rientjes@google.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Nick Piggin <npiggin@suse.de>,
	Christoph Lameter <cl@linux-foundation.org>,
	Dave Hansen <dave@linux.vnet.ibm.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [patch -mmotm] mm: invoke oom killer for __GFP_NOFAIL
Date: Mon, 11 May 2009 23:00:44 +0900	[thread overview]
Message-ID: <28c262360905110700p68f3de35xf0a1d52d2ccfd968@mail.gmail.com> (raw)
In-Reply-To: <20090511133840.GA11624@csn.ul.ie>

Hi, Mel.

On Mon, May 11, 2009 at 10:38 PM, Mel Gorman <mel@csn.ul.ie> wrote:
> On Mon, May 11, 2009 at 08:21:21PM +0900, Minchan Kim wrote:
>> On Mon, May 11, 2009 at 6:12 PM, Minchan Kim <minchan.kim@gmail.com> wrote:
>> > On Mon, May 11, 2009 at 5:40 PM, David Rientjes <rientjes@google.com> wrote:
>> >> On Mon, 11 May 2009, Minchan Kim wrote:
>> >>
>> >>> Hmm.. if __alloc_pages_may_oom fail to allocate free page due to order > PAGE_ALLOC_COSTRY_ORDER,
>> >>>
>> >>> It will go to nopage label in __alloc_pages_slowpath.
>> >>> Then it will show the page allocation failure warning and will return.
>> >>> Retrying depends on caller.
>> >>>
>> >>
>> >> Correct.
>> >>
>> >>> So, I think it won't loop forever.
>> >>> Do I miss something ?
>> >>>
>> >>
>> >> __GFP_NOFAIL allocations shouldn't fail, that's the point of the gfp flag.
>> >> So failing without attempting to free some memory is the wrong thing to
>> >> do.
>> >
>> > Thanks for quick reply.
>> > I was confused by your description.
>> > I thought you suggested we have to prevent loop forever.
>> >
>> >>
>> >>> In addition, the OOM killer can help for getting the high order pages ?
>> >>>
>> >>
>> >> Sure, if it selects a task that will free a lot of memory, which is it's
>> >> goal.
>> >>
>> >
>> > How do we know any task have a lot of memory ?
>> > If we select wrong task and kill one ?
>> >
>> > I have a concern about innocent task.
>>
>> Now, I look over __out_of_memory.
>> For selecting better tasks in case of PAGE_ALLOC_COSTRY_ORDER, How
>> about increasing score of task which have VM_HUGETLB vma in badness ?
>>
>
> That is unjustified. It penalises a process even if it only allocated one
> hugepage and it is not a reflection of how much memory the process is using
> or how badly behaved it is.
> Even worse, if the huge page was allocated from the static hugepage pool then
> the hugepages are freed to the hugepage pool and not the page allocator when
> the process is killed. This means that killing a process using hugepages
> does not necessarily help applications requiring more memory unless they
> also want hugepages. However, a hugepage allocation will not trigger the
> OOM killer so killing processes using hugepages still does not help.

Thanks for pointing me.
In fact, I expect your great answer. :)

So, how do we prevent innocent task killing for allocation of high order page ?
I think it is trade off. but at least, we have been prevent it until now.

But this patch increases the probability of innocent task killing.
Is GFP_NOFAIL's early bailout more important than killing of innocent task ?

I am not sure.

> --
> Mel Gorman
> Part-time Phd Student                          Linux Technology Center
> University of Limerick                         IBM Dublin Software Lab
>



-- 
Kinds regards,
Minchan Kim

  reply	other threads:[~2009-05-11 14:00 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-09 22:46 David Rientjes
2009-05-10 23:42 ` Rik van Riel
2009-05-11  7:29 ` Minchan Kim
2009-05-11  8:40   ` David Rientjes
2009-05-11  9:12     ` Minchan Kim
2009-05-11 11:21       ` Minchan Kim
2009-05-11 13:38         ` Mel Gorman
2009-05-11 14:00           ` Minchan Kim [this message]
2009-05-11 19:32             ` David Rientjes
2009-05-11 23:48               ` Minchan Kim
2009-05-11 21:32             ` Mel Gorman
2009-05-11 23:41               ` Minchan Kim
2009-05-11 10:40 ` Mel Gorman
2009-05-11 19:37   ` David Rientjes
2009-05-11 20:40 ` Andrew Morton
2009-05-12 12:42   ` Jens Axboe
2009-05-12 13:05     ` Nick Piggin
2009-05-12 16:37       ` Jens Axboe
2009-05-12 16:49         ` Nick Piggin
2009-05-12 17:35           ` Jens Axboe

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=28c262360905110700p68f3de35xf0a1d52d2ccfd968@mail.gmail.com \
    --to=minchan.kim@gmail.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux-foundation.org \
    --cc=dave@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®