linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Nishanth Aravamudan <nacc@us.ibm.com>
To: Dave Hansen <haveblue@us.ibm.com>
Cc: akpm@linux-foundation.org, mel@skynet.ie, wli@holomorphy.com,
	apw@shadowen.org, linux-mm@kvack.org
Subject: Re: [PATCH] mm: fix confusing __GFP_REPEAT related comments
Date: Thu, 29 Nov 2007 20:19:22 -0800	[thread overview]
Message-ID: <20071130041922.GQ13444@us.ibm.com> (raw)
In-Reply-To: <1196378080.18851.116.camel@localhost>

On 29.11.2007 [15:14:40 -0800], Dave Hansen wrote:
> On Thu, 2007-11-29 at 13:48 -0800, Nishanth Aravamudan wrote:
> > __GFP_NOFAIL means repeat forever
> > 
> > order <= PAGE_ALLOC_COSTLY_ORDER means __GFP_NOFAIL 
> 
> If this is true, why do we still pass in __GFP_REPEAT to the
> pgd_alloc() functions (at least in x86's pgalloc_64.h and
> pgtable_32.c).  We don''t ever have pagetables exceeding
> PAGE_ALLOC_COSTLY_ORDER, do we?

That's a very good question. And is related to one of mine that you
snipped:

"In looking at the callers using __GFP_REPEAT, not all handle failure --
should they be using __NOFAIL?"

I *think* that all the current __GFP_REPEAT users are order <=
PAGE_ALLOC_CSOTLY_ORDER. Perhaps they all mean to use __GPF_NOFAIL? Some
don't handle failure immediately, but maybe their callers do, I haven't
had time to investigate fully.

And the whole gist, per the comments in mm/page_alloc.c, is that this is
all dependent upon this implementation of the VM. I think that means you
can't rely on those semantics being valid forever. So it's best for
callers to be as explicit as possible ... but in this case, I'm not sure
that the desired semantics actually exist.

Thanks,
Nish

-- 
Nishanth Aravamudan <nacc@us.ibm.com>
IBM Linux Technology Center

--
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>

  reply	other threads:[~2007-11-30  4:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-29 21:48 [PATCH] mm: fix confusing __GFP_REPEAT related comments Nishanth Aravamudan
2007-11-29 23:14 ` Dave Hansen
2007-11-30  4:19   ` Nishanth Aravamudan [this message]
2007-11-30 18:27     ` Dave Hansen
2007-11-30 17:43       ` Nishanth Aravamudan
2007-11-30 18:31         ` Dave Hansen
2007-12-02 11:58 ` William Lee Irwin III
2007-12-03 18:06   ` Nishanth Aravamudan
  -- strict thread matches above, loose matches on Subject: below --
2007-11-20  1:10 Nishanth Aravamudan

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=20071130041922.GQ13444@us.ibm.com \
    --to=nacc@us.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=apw@shadowen.org \
    --cc=haveblue@us.ibm.com \
    --cc=linux-mm@kvack.org \
    --cc=mel@skynet.ie \
    --cc=wli@holomorphy.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;
as well as URLs for NNTP newsgroup(s).