aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64
diff options
context:
space:
mode:
authorMel Gorman <mel@csn.ul.ie>2007-10-16 04:26:01 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-16 12:43:00 -0400
commitd9c2340052278d8eb2ffb16b0484f8f794def4de (patch)
treeaec7e4e11473a4fcdfd389c718544780a042c6df /arch/ia64
parentd100313fd615cc30374ff92e0b3facb053838330 (diff)
Do not depend on MAX_ORDER when grouping pages by mobility
Currently mobility grouping works at the MAX_ORDER_NR_PAGES level. This makes sense for the majority of users where this is also the huge page size. However, on platforms like ia64 where the huge page size is runtime configurable it is desirable to group at a lower order. On x86_64 and occasionally on x86, the hugepage size may not always be MAX_ORDER_NR_PAGES. This patch groups pages together based on the value of HUGETLB_PAGE_ORDER. It uses a compile-time constant if possible and a variable where the huge page size is runtime configurable. It is assumed that grouping should be done at the lowest sensible order and that the user would not want to override this. If this is not true, page_block order could be forced to a variable initialised via a boot-time kernel parameter. One potential issue with this patch is that IA64 now parses hugepagesz with early_param() instead of __setup(). __setup() is called after the memory allocator has been initialised and the pageblock bitmaps already setup. In tests on one IA64 there did not seem to be any problem with using early_param() and in fact may be more correct as it guarantees the parameter is handled before the parsing of hugepages=. Signed-off-by: Mel Gorman <mel@csn.ul.ie> Acked-by: Andy Whitcroft <apw@shadowen.org> Acked-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/ia64')
-rw-r--r--arch/ia64/Kconfig5
-rw-r--r--arch/ia64/mm/hugetlbpage.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index 802b082e216d..f80f5e2aec87 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -54,6 +54,11 @@ config ARCH_HAS_ILOG2_U64
54 bool 54 bool
55 default n 55 default n
56 56
57config HUGETLB_PAGE_SIZE_VARIABLE
58 bool
59 depends on HUGETLB_PAGE
60 default y
61
57config GENERIC_FIND_NEXT_BIT 62config GENERIC_FIND_NEXT_BIT
58 bool 63 bool
59 default y 64 default y
diff --git a/arch/ia64/mm/hugetlbpage.c b/arch/ia64/mm/hugetlbpage.c
index a9ff685aea25..d3ce8f3bcaa6 100644
--- a/arch/ia64/mm/hugetlbpage.c
+++ b/arch/ia64/mm/hugetlbpage.c
@@ -194,6 +194,6 @@ static int __init hugetlb_setup_sz(char *str)
194 * override here with new page shift. 194 * override here with new page shift.
195 */ 195 */
196 ia64_set_rr(HPAGE_REGION_BASE, hpage_shift << 2); 196 ia64_set_rr(HPAGE_REGION_BASE, hpage_shift << 2);
197 return 1; 197 return 0;
198} 198}
199__setup("hugepagesz=", hugetlb_setup_sz); 199early_param("hugepagesz", hugetlb_setup_sz);