linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Bob Liu <lliubbo@gmail.com>
To: Minchan Kim <minchan.kim@gmail.com>
Cc: akpm@linux-foundation.org, linux-mm@kvack.org,
	andi@firstfloor.org, rientjes@google.com,
	lee.schermerhorn@hp.com, Mel Gorman <mel@csn.ul.ie>
Subject: Re: [PATCH] mempolicy:add GFP_THISNODE when allocing new page
Date: Tue, 6 Apr 2010 12:56:33 +0800	[thread overview]
Message-ID: <l2rcf18f8341004052156n23c77078va3370beb72f33c51@mail.gmail.com> (raw)
In-Reply-To: <k2m28c262361004052133jfc62525bw3cd570765d160876@mail.gmail.com>

On 4/6/10, Minchan Kim <minchan.kim@gmail.com> wrote:
> On Tue, Apr 6, 2010 at 11:59 AM, Bob Liu <lliubbo@gmail.com> wrote:
>> In funtion migrate_pages(), if the dest node have no
>> enough free pages,it will fallback to other nodes.
>> Add GFP_THISNODE to avoid this, the same as what
>> funtion new_page_node() do in migrate.c.
>>
>> Signed-off-by: Bob Liu <lliubbo@gmail.com>
>
> Yes. It can be fixed. but I have a different concern.
>
> I looked at 6484eb3e2a81807722c5f28ef.
> "   page allocator: do not check NUMA node ID when the caller knows
> the node is valid
>
>    Callers of alloc_pages_node() can optionally specify -1 as a node to mean
>    "allocate from the current node".  However, a number of the callers in
>    fast paths know for a fact their node is valid.  To avoid a comparison
> and
>    branch, this patch adds alloc_pages_exact_node() that only checks the nid
>    with VM_BUG_ON().  Callers that know their node is valid are then
>    converted."
>
> alloc_pages_exact_node's naming would be not good.
> It is not for allocate page from exact node but just for
> removing check of node's valid.
> Some people like me who is poor english could misunderstood it.
>
> How about changing name with following?
> /* This function can allocate page to fallback list of node*/
> alloc_pages_by_nodeid(...)
>
> And instead of it, let's change alloc_pages_exact_node with following.
> static inline struct page *alloc_pages_exact_node(...)
> {
>  VM_BUG_ON ..
>  return __alloc_pages(gfp_mask|__GFP_THISNODE...);
> }
>
> I think it's more clear than old.
> What do you think about it?
>
Hm.. I agree with you, I was also misunderstanding by the name.
But let's still waiting for some other reply.

By the way, what about your opinion using GFP_THISNODE or
__GFP_THISNODE in __alloc_pages().
I think GFP_THISNODE is ok.

Thanks.
-- 
Regards,
--Bob

--
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:[~2010-04-06  4:56 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-06  2:59 [PATCH] mempolicy:add GFP_THISNODE when allocing new page Bob Liu
2010-04-06  4:33 ` Minchan Kim
2010-04-06  4:56   ` Bob Liu [this message]
2010-04-06  5:06     ` Minchan Kim
2010-04-13  8:19 ` KAMEZAWA Hiroyuki
2010-04-13  8:20 ` Bob Liu
2010-04-13  8:38   ` Mel Gorman
2010-04-13 14:28     ` Bob Liu
2010-04-16  0:41       ` Christoph Lameter
2010-04-16  1:02         ` Bob Liu
2010-04-16 16:02           ` Christoph Lameter
2010-04-16 11:15       ` Mel Gorman
2010-04-16 15:03         ` Bob Liu
2010-04-16 15:55           ` Christoph Lameter
2010-04-17 13:54             ` Bob Liu
2010-04-19 17:47               ` Christoph Lameter
2010-04-20  2:08                 ` Bob Liu
2010-04-21 14:13                   ` Christoph Lameter
2010-04-22  1:03                     ` Bob Liu
2010-04-22 14:38                       ` Christoph Lameter
2010-04-13  8:27 ` Minchan Kim

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=l2rcf18f8341004052156n23c77078va3370beb72f33c51@mail.gmail.com \
    --to=lliubbo@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=andi@firstfloor.org \
    --cc=lee.schermerhorn@hp.com \
    --cc=linux-mm@kvack.org \
    --cc=mel@csn.ul.ie \
    --cc=minchan.kim@gmail.com \
    --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;
as well as URLs for NNTP newsgroup(s).