linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/6] Remove node's validity check in alloc_pages
@ 2010-04-13 15:24 Minchan Kim
  2010-04-13 15:24 ` [PATCH 2/6] change alloc function in pcpu_alloc_pages Minchan Kim
                   ` (6 more replies)
  0 siblings, 7 replies; 54+ messages in thread
From: Minchan Kim @ 2010-04-13 15:24 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Mel Gorman, KAMEZAWA Hiroyuki, Bob Liu, linux-kernel, linux-mm,
	Minchan Kim

alloc_pages calls alloc_pages_node with numa_node_id().
alloc_pages_node can't see nid < 0.

So we can use alloc_pages_exact_node instead of alloc_pages_node.
It could avoid comparison and branch as 6484eb3e2a81807722 tried.

Cc: Mel Gorman <mel@csn.ul.ie>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Minchan Kim <minchan.kim@gmail.com>
---
 include/linux/gfp.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/linux/gfp.h b/include/linux/gfp.h
index 4c6d413..b65f003 100644
--- a/include/linux/gfp.h
+++ b/include/linux/gfp.h
@@ -308,7 +308,7 @@ extern struct page *alloc_page_vma(gfp_t gfp_mask,
 			struct vm_area_struct *vma, unsigned long addr);
 #else
 #define alloc_pages(gfp_mask, order) \
-		alloc_pages_node(numa_node_id(), gfp_mask, order)
+		alloc_pages_exact_node(numa_node_id(), gfp_mask, order)
 #define alloc_page_vma(gfp_mask, vma, addr) alloc_pages(gfp_mask, 0)
 #endif
 #define alloc_page(gfp_mask) alloc_pages(gfp_mask, 0)
-- 
1.7.0.5


^ permalink raw reply related	[flat|nested] 54+ messages in thread

end of thread, other threads:[~2010-04-22 10:15 UTC | newest]

Thread overview: 54+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-13 15:24 [PATCH 1/6] Remove node's validity check in alloc_pages Minchan Kim
2010-04-13 15:24 ` [PATCH 2/6] change alloc function in pcpu_alloc_pages Minchan Kim
2010-04-13 15:48   ` Mel Gorman
2010-04-14 23:39     ` Tejun Heo
2010-04-15  1:31       ` Minchan Kim
2010-04-15  7:21         ` Tejun Heo
2010-04-15  8:00           ` Minchan Kim
2010-04-15  8:15             ` Tejun Heo
2010-04-15  9:40               ` Minchan Kim
2010-04-15 10:08                 ` Tejun Heo
2010-04-15 10:21                   ` Minchan Kim
2010-04-15 10:33                     ` Minchan Kim
2010-04-15 11:43                     ` Tejun Heo
2010-04-15 11:49                       ` Minchan Kim
2010-04-16 16:07                         ` Christoph Lameter
2010-04-16 19:13                           ` Lee Schermerhorn
2010-04-18 15:55                             ` Minchan Kim
2010-04-18 15:54                           ` Minchan Kim
2010-04-18 21:22                             ` Tejun Heo
2010-04-19  0:03                               ` Minchan Kim
2010-04-19 17:45                                 ` Christoph Lameter
2010-04-20  0:20                                   ` Minchan Kim
2010-04-19 17:38                             ` Christoph Lameter
2010-04-19 22:27                               ` Tejun Heo
2010-04-20 15:05                                 ` Mel Gorman
2010-04-21 10:48                                   ` Tejun Heo
2010-04-22 10:15                                     ` Minchan Kim
2010-04-21 14:15                                   ` Christoph Lameter
2010-04-21 17:06                                     ` Minchan Kim
2010-04-13 15:25 ` [PATCH 3/6] change alloc function in alloc_slab_page Minchan Kim
2010-04-13 15:52   ` Mel Gorman
2010-04-13 16:01     ` Minchan Kim
2010-04-13 16:14       ` Mel Gorman
2010-04-13 21:37   ` David Rientjes
2010-04-13 23:40     ` Minchan Kim
2010-04-13 23:55       ` David Rientjes
2010-04-14  0:02         ` Minchan Kim
2010-04-14  0:18   ` KAMEZAWA Hiroyuki
2010-04-14 12:23     ` Pekka Enberg
2010-04-16 16:10       ` Christoph Lameter
2010-04-18 18:49         ` Pekka Enberg
2010-04-19  9:05         ` Mel Gorman
2010-04-13 15:25 ` [PATCH 4/6] change alloc function in vmemmap_alloc_block Minchan Kim
2010-04-13 15:59   ` Mel Gorman
2010-04-14  0:19   ` KAMEZAWA Hiroyuki
2010-04-13 15:25 ` [PATCH 5/6] change alloc function in __vmalloc_area_node Minchan Kim
2010-04-13 16:02   ` Mel Gorman
2010-04-14  0:22   ` KAMEZAWA Hiroyuki
2010-04-14  0:33     ` Minchan Kim
2010-04-13 15:25 ` [PATCH 6/6] Add comment in alloc_pages_exact_node Minchan Kim
2010-04-13 16:13   ` Mel Gorman
2010-04-13 16:20     ` Minchan Kim
2010-04-13 15:32 ` [PATCH 1/6] Remove node's validity check in alloc_pages Mel Gorman
2010-04-14  0:04 ` KAMEZAWA Hiroyuki

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