linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Pekka Enberg <penberg@cs.helsinki.fi>
To: Minchan Kim <minchan.kim@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Mel Gorman <mel@csn.ul.ie>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	Bob Liu <lliubbo@gmail.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	Christoph Lameter <cl@linux-foundation.org>
Subject: Re: [PATCH v2] change alloc function in alloc_slab_page
Date: Wed, 14 Apr 2010 20:50:02 +0300	[thread overview]
Message-ID: <4BC6004A.9020403@cs.helsinki.fi> (raw)
In-Reply-To: <1271257119-30117-3-git-send-email-minchan.kim@gmail.com>

Minchan Kim wrote:
> V2
> * change changelog
> * Add some reviewed-by 
> 
> alloc_slab_page always checks nid == -1, so alloc_page_node can't be
> called with -1. 
> It means node's validity check in alloc_pages_node is unnecessary. 
> So we can use alloc_pages_exact_node instead of alloc_pages_node. 
> It could avoid comparison and branch as 6484eb3e2a81807722 tried.
> 
> Cc: Pekka Enberg <penberg@cs.helsinki.fi>
> Cc: Christoph Lameter <cl@linux-foundation.org>
> Signed-off-by: Minchan Kim <minchan.kim@gmail.com>
> Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> Reviewed-by: Mel Gorman <mel@csn.ul.ie>
> ---
>  mm/slub.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/mm/slub.c b/mm/slub.c
> index b364844..9984165 100644
> --- a/mm/slub.c
> +++ b/mm/slub.c
> @@ -1084,7 +1084,7 @@ static inline struct page *alloc_slab_page(gfp_t flags, int node,
>  	if (node == -1)
>  		return alloc_pages(flags, order);
>  	else
> -		return alloc_pages_node(node, flags, order);
> +		return alloc_pages_exact_node(node, flags, order);
>  }
>  
>  static struct page *allocate_slab(struct kmem_cache *s, gfp_t flags, int node)

Applied, thanks!

--
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-14 17:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-14 14:58 [PATCH v2] Remove node's validity check in alloc_pages Minchan Kim
2010-04-14 14:58 ` [PATCH] change alloc function in pcpu_alloc_pages Minchan Kim
2010-04-14 14:58 ` [PATCH v2] change alloc function in alloc_slab_page Minchan Kim
2010-04-14 17:50   ` Pekka Enberg [this message]
2010-04-14 14:58 ` [PATCH v2] change alloc function in vmemmap_alloc_block Minchan Kim
2010-04-14 14:58 ` [PATCH v2] change alloc function in __vmalloc_area_node Minchan Kim
2010-04-14 14:58 ` [PATCH v2] Add comment in alloc_pages_exact_node 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=4BC6004A.9020403@cs.helsinki.fi \
    --to=penberg@cs.helsinki.fi \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux-foundation.org \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lliubbo@gmail.com \
    --cc=mel@csn.ul.ie \
    --cc=minchan.kim@gmail.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).