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, mel@csn.ul.ie,
	cl@linux-foundation.org, kosaki.motohiro@jp.fujitsu.com,
	penberg@cs.helsinki.fi, lethal@linux-sh.org,
	a.p.zijlstra@chello.nl, dave@linux.vnet.ibm.com,
	lee.schermerhorn@hp.com, rientjes@google.com
Subject: Re: [PATCH] add alloc_pages_exact_node()
Date: Mon, 12 Apr 2010 11:43:38 +0800	[thread overview]
Message-ID: <n2gcf18f8341004112043j37bea8echd539b894a4a0dab@mail.gmail.com> (raw)
In-Reply-To: <x2y28c262361004112038p8699872ay700ebf967cd11907@mail.gmail.com>

On Mon, Apr 12, 2010 at 11:38 AM, Minchan Kim <minchan.kim@gmail.com> wrote:
> Hi, Bob.
>
> On Sat, Apr 10, 2010 at 8:49 PM, Bob Liu <lliubbo@gmail.com> wrote:
>> Add alloc_pages_exact_node() to allocate pages from exact
>> node.
>>
>> Signed-off-by: Bob Liu <lliubbo@gmail.com>
>> ---
>>  arch/powerpc/platforms/cell/ras.c |    4 ++--
>>  include/linux/gfp.h               |    7 +++++++
>>  mm/mempolicy.c                    |    2 +-
>>  mm/migrate.c                      |    3 +--
>>  4 files changed, 11 insertions(+), 5 deletions(-)
>>
>> diff --git a/arch/powerpc/platforms/cell/ras.c b/arch/powerpc/platforms/cell/ras.c
>> index 6d32594..93a5afd 100644
>> --- a/arch/powerpc/platforms/cell/ras.c
>> +++ b/arch/powerpc/platforms/cell/ras.c
>> @@ -123,8 +123,8 @@ static int __init cbe_ptcal_enable_on_node(int nid, int order)
>>
>>        area->nid = nid;
>>        area->order = order;
>> -       area->pages = alloc_pages_from_valid_node(area->nid,
>> -                       GFP_KERNEL | GFP_THISNODE, area->order);
>> +       area->pages = alloc_pages_exact_node(area->nid, GFP_KERNEL,
>> +                               area->order);
>>
>>        if (!area->pages) {
>>                printk(KERN_WARNING "%s: no page on node %d\n",
>> diff --git a/include/linux/gfp.h b/include/linux/gfp.h
>> index c94f2ed..70cf2ae 100644
>> --- a/include/linux/gfp.h
>> +++ b/include/linux/gfp.h
>> @@ -296,6 +296,13 @@ static inline struct page *alloc_pages_from_valid_node(int nid, gfp_t gfp_mask,
>>        return __alloc_pages(gfp_mask, order, node_zonelist(nid, gfp_mask));
>>  }
>>
>> +static inline struct page *alloc_pages_exact_node(int nid, gfp_t gfp_mask,
>> +                                               unsigned int order)
>> +{
>> +       return alloc_pages_from_valid_node(nid, gfp_mask | GFP_THISNODE,
>> +                       order);
>> +}
>> +
>>  #ifdef CONFIG_NUMA
>>  extern struct page *alloc_pages_current(gfp_t gfp_mask, unsigned order);
>>
>> diff --git a/mm/mempolicy.c b/mm/mempolicy.c
>> index 6838cd8..08f40a2 100644
>> --- a/mm/mempolicy.c
>> +++ b/mm/mempolicy.c
>> @@ -842,7 +842,7 @@ static void migrate_page_add(struct page *page, struct list_head *pagelist,
>>
>>  static struct page *new_node_page(struct page *page, unsigned long node, int **x)
>>  {
>> -       return alloc_pages_from_valid_node(node, GFP_HIGHUSER_MOVABLE, 0);
>> +       return alloc_pages_exact_node(node, GFP_HIGHUSER_MOVABLE, 0);
>>  }
>
> It's behavior change. Please, write down why you want to change
> behavior in log.
> Although I knew it, you need to explain it for others and git log,
>
Hm, ok.
I will add the log later. Thank you for your suggestion.

-- 
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-12  3:43 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-10 11:49 [PATCH] code clean rename alloc_pages_exact_node() Bob Liu
2010-04-10 11:49 ` [PATCH] add alloc_pages_exact_node() Bob Liu
2010-04-12  3:38   ` Minchan Kim
2010-04-12  3:43     ` Bob Liu [this message]
2010-04-12 16:38   ` Mel Gorman
2010-04-12  3:34 ` [PATCH] code clean rename alloc_pages_exact_node() Minchan Kim
2010-04-12  3:40   ` Bob Liu
2010-04-12 16:43 ` Mel Gorman
2010-04-13  4:34   ` Minchan Kim
2010-04-13  5:40     ` KAMEZAWA Hiroyuki
2010-04-13  7:09       ` Bob Liu
2010-04-13  7:32         ` KAMEZAWA Hiroyuki
2010-04-13  7:53           ` Minchan Kim
2010-04-13  7:37         ` Minchan Kim
2010-04-13  7:40         ` Minchan Kim
2010-04-13  8:27         ` Mel Gorman
2010-04-16 16:20           ` Christoph Lameter
2010-04-16 16:15         ` Christoph Lameter

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=n2gcf18f8341004112043j37bea8echd539b894a4a0dab@mail.gmail.com \
    --to=lliubbo@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=kosaki.motohiro@jp.fujitsu.com \
    --cc=lee.schermerhorn@hp.com \
    --cc=lethal@linux-sh.org \
    --cc=linux-mm@kvack.org \
    --cc=mel@csn.ul.ie \
    --cc=minchan.kim@gmail.com \
    --cc=penberg@cs.helsinki.fi \
    --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).