* [-mm][PATCH] Fix broken gfp_zone with __GFP_THISNODE
@ 2008-04-16 5:54 KAMEZAWA Hiroyuki
0 siblings, 0 replies; only message in thread
From: KAMEZAWA Hiroyuki @ 2008-04-16 5:54 UTC (permalink / raw)
To: linux-mm
Cc: Andrew Morton, Christoph Lameter, mel, Lee.Schermerhorn, kosaki.motohiro
This patch is for -mm.
Fix broken __GFP_THISNODE.
-Kame
==
This hack, "base = MAX_NR_ZONES", at __GFP_THISNODE was used for
old zonliests.
Now, new zonelist[] have a list for __GFP_THISNODE and this hack
is incorrect. Should be removed.
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
---
include/linux/gfp.h | 17 +++++------------
1 file changed, 5 insertions(+), 12 deletions(-)
Index: mm-2.6.25-rc8-mm2/include/linux/gfp.h
===================================================================
--- mm-2.6.25-rc8-mm2.orig/include/linux/gfp.h
+++ mm-2.6.25-rc8-mm2/include/linux/gfp.h
@@ -119,29 +119,22 @@ static inline int allocflags_to_migratet
static inline enum zone_type gfp_zone(gfp_t flags)
{
- int base = 0;
-
-#ifdef CONFIG_NUMA
- if (flags & __GFP_THISNODE)
- base = MAX_NR_ZONES;
-#endif
-
#ifdef CONFIG_ZONE_DMA
if (flags & __GFP_DMA)
- return base + ZONE_DMA;
+ return ZONE_DMA;
#endif
#ifdef CONFIG_ZONE_DMA32
if (flags & __GFP_DMA32)
- return base + ZONE_DMA32;
+ return ZONE_DMA32;
#endif
if ((flags & (__GFP_HIGHMEM | __GFP_MOVABLE)) ==
(__GFP_HIGHMEM | __GFP_MOVABLE))
- return base + ZONE_MOVABLE;
+ return ZONE_MOVABLE;
#ifdef CONFIG_HIGHMEM
if (flags & __GFP_HIGHMEM)
- return base + ZONE_HIGHMEM;
+ return ZONE_HIGHMEM;
#endif
- return base + ZONE_NORMAL;
+ return ZONE_NORMAL;
}
/*
--
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>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-04-16 5:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-16 5:54 [-mm][PATCH] Fix broken gfp_zone with __GFP_THISNODE KAMEZAWA Hiroyuki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox