Fix boot problem with iSeries lacking hugepage support
Subsystems (3)
PATCH 1/1 Fix boot problem with iSeries lacking hugepage support
This patch is a fix for 2.6.24.
Ordinarily the size of a pageblock is determined at compile-time based on the hugepage size. On PPC64, the hugepage size is determined at runtime based on what is supported by the machine. With legacy machines such as iSeries that do not support hugepages, HPAGE_SHIFT becomes 0. This results in pageblock_order being set to -PAGE_SHIFT and a crash results shortly afterwards.
This patch sets HUGETLB_PAGE_SIZE_VARIABLE for PPC64 and adds a function to select a sensible value for pageblock order by default. It checks that HPAGE_SHIFT is a sensible value before using the hugepage size; if it is not MAX_ORDER-1 is used.
Credit goes to Stephen Rothwell for identifying the bug and testing candidate patches. Additional credit goes to Andy Whitcroft for spotting a problem with respects to IA-64 before releasing. Additional credit to David Gibson for testing with the libhugetlbfs test suite.
---
arch/powerpc/Kconfig | 5 +++++ mm/page_alloc.c | 14 ++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-)
arch/powerpc/Kconfig +5 -0
@@ -187,6 +187,11 @@ config FORCE_MAX_ZONEORDER default "9" if PPC_64K_PAGES default "13" +config HUGETLB_PAGE_SIZE_VARIABLE + bool + depends on HUGETLB_PAGE + default y + config MATH_EMULATION bool "Math emulation" depends on 4xx || 8xx || E200 || PPC_MPC832x || E500
mm/page_alloc.c +12 -2
@@ -3342,6 +3342,16 @@ static void inline setup_usemap(struct p#endif /* CONFIG_SPARSEMEM */ #ifdef CONFIG_HUGETLB_PAGE_SIZE_VARIABLE + +/* Return a sensible default order for the pageblock size. */ +static inline int __init pageblock_default_order (void ) +{ +if (HPAGE_SHIFT >PAGE_SHIFT ) +return HUGETLB_PAGE_ORDER ; + +return MAX_ORDER -1 ; +} +/* Initialise the number of pages represented by NR_PAGEBLOCK_BITS */ static inline void __init set_pageblock_order (unsigned int order) {
@@ -3357,7 +3367,7 @@ static inline void __init set_pageblock_ }#else /* CONFIG_HUGETLB_PAGE_SIZE_VARIABLE */ -/* Defined this way to avoid accidently referencing HUGETLB_PAGE_ORDER */ +#define pageblock_default_order (x) (0)#define set_pageblock_order (x) do {} while (0)#endif /* CONFIG_HUGETLB_PAGE_SIZE_VARIABLE */
@@ -3442,7 +3452,7 @@ static void __meminit free_area_init_corif (!size)continue ; -set_pageblock_order (HUGETLB_PAGE_ORDER ); +set_pageblock_order (pageblock_default_order ());setup_usemap (pgdat, zone, size); ret =init_currently_empty_zone (zone, zone_start_pfn, size,MEMMAP_EARLY );
Signature · 10 lines
-- Mel Gorman Part-time Phd Student Linux Technology Center University of Limerick IBM Dublin Software Lab -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Andrew Morton
maintainerQuoted 13 lines · On Thu, 15 Nov 2007 10:13:22 +0000 [email protected] (Mel Gorman) wrote:
This patch is a fix for 2.6.24.
Ordinarily the size of a pageblock is determined at compile-time based on the hugepage size. On PPC64, the hugepage size is determined at runtime based on what is supported by the machine. With legacy machines such as iSeries that do not support hugepages,
HPAGE_SHIFTbecomes 0. This results inpageblock_orderbeing set to -PAGE_SHIFT and a crash results shortly afterwards.This patch sets
HUGETLB_PAGE_SIZE_VARIABLEfor PPC64 and adds a function to select a sensible value for pageblock order by default. It checks thatHPAGE_SHIFTis a sensible value before using the hugepage size; if it is not MAX_ORDER-1 is used.
Quoted 5 lines
Credit goes to Stephen Rothwell for identifying the bug and testing candidate patches. Additional credit goes to Andy Whitcroft for spotting a problem with respects to IA-64 before releasing. Additional credit to David Gibson for testing with the libhugetlbfs test suite.
umm.
Review
Quoted 3 lines
(quoted diff) +3
-0+ +/* Return a sensible default order for the pageblock size. */ +static inline int __init pageblock_default_order(void)
inline and __init doesn't make sense.
Quoted 11 lines
(quoted diff) +7
-0+{ + if (HPAGE_SHIFT > PAGE_SHIFT) + return HUGETLB_PAGE_ORDER; + + return MAX_ORDER-1; +} + /* Initialise the number of pages represented by NR_PAGEBLOCK_BITS */ static inline void __init set_pageblock_order(unsigned int order) {
Review static inline void __init set_pageblock_ · line 3370
Quoted 5 lines
(quoted diff) +1
-1@@ -3357,7 +3367,7 @@ static inline void __init set_pageblock_ } #else /* CONFIG_HUGETLB_PAGE_SIZE_VARIABLE */ -/* Defined this way to avoid accidently referencing HUGETLB_PAGE_ORDER */ +#define pageblock_default_order(x) (0)
that won't compile.
Review static void __meminit free_area_init_cor · line 3457
Quoted 11 lines
(quoted diff) +1
-1#define set_pageblock_order(x) do {} while (0) #endif /* CONFIG_HUGETLB_PAGE_SIZE_VARIABLE */@@ -3442,7 +3452,7 @@ static void __meminit free_area_init_cor if (!size) continue; - set_pageblock_order(HUGETLB_PAGE_ORDER); + set_pageblock_order(pageblock_default_order()); setup_usemap(pgdat, zone, size); ret = init_currently_empty_zone(zone, zone_start_pfn,
mm/page_alloc.c renamed from mm/page_alloc.c~fix-boot-problem-with-iseries-lacking-hugepage-support-fix +6 -2
@@ -3268,7 +3268,7 @@ static void inline setup_usemap(struct p#ifdef CONFIG_HUGETLB_PAGE_SIZE_VARIABLE /* Return a sensible default order for the pageblock size. */ -static inline int __init pageblock_default_order (void ) +static inline int pageblock_default_order (void ) {if (HPAGE_SHIFT >PAGE_SHIFT )return HUGETLB_PAGE_ORDER ;
@@ -3291,7 +3291,11 @@ static inline void __init set_pageblock_ }#else /* CONFIG_HUGETLB_PAGE_SIZE_VARIABLE */ -#define pageblock_default_order (x) (0) +static inline int pageblock_default_order (void ) +{ +return 0 ; +} +#define set_pageblock_order (x) do {} while (0)#endif /* CONFIG_HUGETLB_PAGE_SIZE_VARIABLE */
_
please avoid adding macros when C could have been used. C is nicer to look at and has typechecking and stuff.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Mel Gorman
Tested-by Stephen RothwellOn (15/11/07 02:32), Andrew Morton didst pronounce:
Quoted 21 lines · On Thu, 15 Nov 2007 10:13:22 +0000 [email protected] (Mel Gorman) wrote:
Quoted 14 lines
This patch is a fix for 2.6.24.
Ordinarily the size of a pageblock is determined at compile-time based on the hugepage size. On PPC64, the hugepage size is determined at runtime based on what is supported by the machine. With legacy machines such as iSeries that do not support hugepages,
HPAGE_SHIFTbecomes 0. This results inpageblock_orderbeing set to -PAGE_SHIFT and a crash results shortly afterwards.This patch sets
HUGETLB_PAGE_SIZE_VARIABLEfor PPC64 and adds a function to select a sensible value for pageblock order by default. It checks thatHPAGE_SHIFTis a sensible value before using the hugepage size; if it is not MAX_ORDER-1 is used.Quoted 5 lines
Credit goes to Stephen Rothwell for identifying the bug and testing candidate patches. Additional credit goes to Andy Whitcroft for spotting a problem with respects to IA-64 before releasing. Additional credit to David Gibson for testing with the libhugetlbfs test suite.
Quoted 8 lines
umm.
Review
Quoted 3 lines
(quoted diff) +3
-0+ +/* Return a sensible default order for the pageblock size. */ +static inline int __init pageblock_default_order(void)inline and
__initdoesn't make sense.
I know the __init is meaningless in this context. It is there as a guide if someone decides to drop the inline for some reason that it should remain as __init. I can post a version with just the inline.
Quoted 14 lines
Quoted 14 lines
(quoted diff) +7
-0+{ + if (HPAGE_SHIFT > PAGE_SHIFT) + return HUGETLB_PAGE_ORDER; + + return MAX_ORDER-1; +} + /* Initialise the number of pages represented by NR_PAGEBLOCK_BITS */ static inline void __init set_pageblock_order(unsigned int order) {@@ -3357,7 +3367,7 @@ static inline void __init set_pageblock_ } #else /* CONFIG_HUGETLB_PAGE_SIZE_VARIABLE */
Quoted 5 lines
Review static inline void __init set_pageblock_ · line 3370
Quoted 2 lines
(quoted diff) +1
-1-/* Defined this way to avoid accidently referencing HUGETLB_PAGE_ORDER */ +#define pageblock_default_order(x) (0)that won't compile.
It's never used so it could have been anything and still compiled. I admit this is confusing. I've posted a version below that changes this to a static inline, returns MAX_ORDER-1 which is a sensible value even if unused and comments on what is happening.
Quoted 40 lines
Quoted 11 lines
(quoted diff) +1
-1#define set_pageblock_order(x) do {} while (0) #endif /* CONFIG_HUGETLB_PAGE_SIZE_VARIABLE */@@ -3442,7 +3452,7 @@ static void __meminit free_area_init_cor if (!size) continue; - set_pageblock_order(HUGETLB_PAGE_ORDER); + set_pageblock_order(pageblock_default_order()); setup_usemap(pgdat, zone, size); ret = init_currently_empty_zone(zone, zone_start_pfn,mm/page_alloc.c renamed from mm/page_alloc.c~fix-boot-problem-with-iseries-lacking-hugepage-support-fix +6
-2@@ -3268,7 +3268,7 @@ static void inline setup_usemap(struct p#ifdef CONFIG_HUGETLB_PAGE_SIZE_VARIABLE /* Return a sensible default order for the pageblock size. */ -static inline int __init pageblock_default_order (void ) +static inline int pageblock_default_order (void ) {if (HPAGE_SHIFT >PAGE_SHIFT )return HUGETLB_PAGE_ORDER ;@@ -3291,7 +3291,11 @@ static inline void __init set_pageblock_ }#else /* CONFIG_HUGETLB_PAGE_SIZE_VARIABLE */ -#define pageblock_default_order (x) (0) +static inline int pageblock_default_order (void ) +{ +return 0 ; +} +#define set_pageblock_order (x) do {} while (0)#endif /* CONFIG_HUGETLB_PAGE_SIZE_VARIABLE */ _
Quoted 3 lines
please avoid adding macros when C could have been used. C is nicer to look at and has typechecking and stuff.
Understood. Here is an updated version. It is functionally equivilant to the earlier patch but may be easier on the eye
===
Ordinarily the size of a pageblock is determined at compile-time based on the hugepage size. On PPC64, the hugepage size is determined at runtime based on what is supported by the machine. With legacy machines such as iSeries that do not support hugepages, HPAGE_SHIFT is 0. This results in pageblock_order being set to -PAGE_SHIFT and a crash results shortly afterwards.
This patch adds a function to select a sensible value for pageblock order by default when HUGETLB_PAGE_SIZE_VARIABLE is set. It checks that HPAGE_SHIFT is a sensible value before using the hugepage size; if it is not MAX_ORDER-1 is used.
This is a fix for 2.6.24.
Credit goes to Stephen Rothwell for identifying the bug and testing candidate patches. Additional credit goes to Andy Whitcroft for spotting a problem with respects to IA-64 before releasing. Additional credit to David Gibson for testing with the libhugetlbfs test suite.
---
arch/powerpc/Kconfig | 5 +++++ mm/page_alloc.c | 23 +++++++++++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-)
arch/powerpc/Kconfig +5 -0
@@ -187,6 +187,11 @@ config FORCE_MAX_ZONEORDER default "9" if PPC_64K_PAGES default "13" +config HUGETLB_PAGE_SIZE_VARIABLE + bool + depends on HUGETLB_PAGE + default y + config MATH_EMULATION bool "Math emulation" depends on 4xx || 8xx || E200 || PPC_MPC832x || E500
mm/page_alloc.c +21 -2
@@ -3342,6 +3342,16 @@ static void inline setup_usemap(struct p#endif /* CONFIG_SPARSEMEM */ #ifdef CONFIG_HUGETLB_PAGE_SIZE_VARIABLE + +/* Return a sensible default order for the pageblock size. */ +static inline int pageblock_default_order (void ) +{ +if (HPAGE_SHIFT >PAGE_SHIFT ) +return HUGETLB_PAGE_ORDER ; + +return MAX_ORDER -1 ; +} +/* Initialise the number of pages represented by NR_PAGEBLOCK_BITS */ static inline void __init set_pageblock_order (unsigned int order) {
@@ -3357,7 +3367,16 @@ static inline void __init set_pageblock_ }#else /* CONFIG_HUGETLB_PAGE_SIZE_VARIABLE */ -/* Defined this way to avoid accidently referencing HUGETLB_PAGE_ORDER */ +/* +* When CONFIG_HUGETLB_PAGE_SIZE_VARIABLE is not set, set_pageblock_order() +* and pageblock_default_order() are unused as pageblock_order is set +* at compile-time. See include/linux/pageblock-flags.h for the values of +* pageblock_order based on the kernel config +*/ +static inline int pageblock_default_order (unsigned int order) +{ +return MAX_ORDER -1 ; +}#define set_pageblock_order (x) do {} while (0)#endif /* CONFIG_HUGETLB_PAGE_SIZE_VARIABLE */
@@ -3442,7 +3461,7 @@ static void __meminit free_area_init_corif (!size)continue ; -set_pageblock_order (HUGETLB_PAGE_ORDER ); +set_pageblock_order (pageblock_default_order ());setup_usemap (pgdat, zone, size); ret =init_currently_empty_zone (zone, zone_start_pfn, size,MEMMAP_EARLY );
Signature · 10 lines
-- Mel Gorman Part-time Phd Student Linux Technology Center University of Limerick IBM Dublin Software Lab -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Andrew Morton
maintainerQuoted 62 lines · On Thu, 15 Nov 2007 10:13:22 +0000 [email protected] (Mel Gorman) wrote:
This patch is a fix for 2.6.24.
Ordinarily the size of a pageblock is determined at compile-time based on the hugepage size. On PPC64, the hugepage size is determined at runtime based on what is supported by the machine. With legacy machines such as iSeries that do not support hugepages,
HPAGE_SHIFTbecomes 0. This results inpageblock_orderbeing set to -PAGE_SHIFT and a crash results shortly afterwards.This patch sets
HUGETLB_PAGE_SIZE_VARIABLEfor PPC64 and adds a function to select a sensible value for pageblock order by default. It checks thatHPAGE_SHIFTis a sensible value before using the hugepage size; if it is not MAX_ORDER-1 is used.Credit goes to Stephen Rothwell for identifying the bug and testing candidate patches. Additional credit goes to Andy Whitcroft for spotting a problem with respects to IA-64 before releasing. Additional credit to David Gibson for testing with the libhugetlbfs test suite.
Signed-off-by Mel Gorman <[email protected]>Tested-by Stephen Rothwell <[email protected]>---
arch/powerpc/Kconfig | 5 +++++ mm/page_alloc.c | 14 ++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-)diff -rup -X
/usr/src/patchset-0.6/bin//dontdifflinux-2.6.24-rc2-mm1-clean/arch/powerpc/Kconfig linux-2.6.24-rc2-005_iSeries_fix/arch/powerpc/Kconfigarch/powerpc/Kconfig +5
-0@@ -187,6 +187,11 @@ config FORCE_MAX_ZONEORDER default "9" if PPC_64K_PAGES default "13" +config HUGETLB_PAGE_SIZE_VARIABLE + bool + depends on HUGETLB_PAGE + default y + config MATH_EMULATION bool "Math emulation" depends on 4xx || 8xx || E200 || PPC_MPC832x || E500diff -rup -X
/usr/src/patchset-0.6/bin//dontdifflinux-2.6.24-rc2-mm1-clean/mm/page_alloc.clinux-2.6.24-rc2-005_iSeries_fix/mm/page_alloc.cmm/page_alloc.c +10
-0@@ -3342,6 +3342,16 @@ static void inline setup_usemap(struct p#endif /* CONFIG_SPARSEMEM */ #ifdef CONFIG_HUGETLB_PAGE_SIZE_VARIABLE + +/* Return a sensible default order for the pageblock size. */ +static inline int __init pageblock_default_order (void ) +{ +if (HPAGE_SHIFT >PAGE_SHIFT ) +return HUGETLB_PAGE_ORDER ; + +return MAX_ORDER -1 ; +} +/* Initialise the number of pages represented by NR_PAGEBLOCK_BITS */ static inline void __init set_pageblock_order (unsigned int order) {
mm/page_alloc.c static inline void __init set_pageblock_ · line 3370
Quoted 5 lines
mm/page_alloc.c +1
-1@@ -3357,7 +3367,7 @@ static inline void __init set_pageblock_ }#else /* CONFIG_HUGETLB_PAGE_SIZE_VARIABLE */ -/* Defined this way to avoid accidently referencing HUGETLB_PAGE_ORDER */ +#define pageblock_default_order (x) (0)
Shouldn't this have been HUGETLB_PAGE_ORDER?
Quoted 17 lines
mm/page_alloc.c +1
-1#define set_pageblock_order (x) do {} while (0)#endif /* CONFIG_HUGETLB_PAGE_SIZE_VARIABLE */ @@ -3442,7 +3452,7 @@ static void __meminit free_area_init_corif (!size)continue ; -set_pageblock_order (HUGETLB_PAGE_ORDER ); +set_pageblock_order (pageblock_default_order ());setup_usemap (pgdat, zone, size); ret =init_currently_empty_zone (zone, zone_start_pfn, size,MEMMAP_EARLY );Signature · 4 lines
-- Mel Gorman Part-time Phd Student Linux Technology Center University of Limerick IBM Dublin Software Lab
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
On (15/11/07 02:39), Andrew Morton didst pronounce:
Quoted 67 lines · On Thu, 15 Nov 2007 10:13:22 +0000 [email protected] (Mel Gorman) wrote:
Quoted 66 lines
This patch is a fix for 2.6.24.
Ordinarily the size of a pageblock is determined at compile-time based on the hugepage size. On PPC64, the hugepage size is determined at runtime based on what is supported by the machine. With legacy machines such as iSeries that do not support hugepages,
HPAGE_SHIFTbecomes 0. This results inpageblock_orderbeing set to -PAGE_SHIFT and a crash results shortly afterwards.This patch sets
HUGETLB_PAGE_SIZE_VARIABLEfor PPC64 and adds a function to select a sensible value for pageblock order by default. It checks thatHPAGE_SHIFTis a sensible value before using the hugepage size; if it is not MAX_ORDER-1 is used.Credit goes to Stephen Rothwell for identifying the bug and testing candidate patches. Additional credit goes to Andy Whitcroft for spotting a problem with respects to IA-64 before releasing. Additional credit to David Gibson for testing with the libhugetlbfs test suite.
Signed-off-by Mel Gorman <[email protected]>Tested-by Stephen Rothwell <[email protected]>---
arch/powerpc/Kconfig | 5 +++++ mm/page_alloc.c | 14 ++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-)diff -rup -X
/usr/src/patchset-0.6/bin//dontdifflinux-2.6.24-rc2-mm1-clean/arch/powerpc/Kconfig linux-2.6.24-rc2-005_iSeries_fix/arch/powerpc/Kconfigarch/powerpc/Kconfig +5
-0@@ -187,6 +187,11 @@ config FORCE_MAX_ZONEORDER default "9" if PPC_64K_PAGES default "13" +config HUGETLB_PAGE_SIZE_VARIABLE + bool + depends on HUGETLB_PAGE + default y + config MATH_EMULATION bool "Math emulation" depends on 4xx || 8xx || E200 || PPC_MPC832x || E500diff -rup -X
/usr/src/patchset-0.6/bin//dontdifflinux-2.6.24-rc2-mm1-clean/mm/page_alloc.clinux-2.6.24-rc2-005_iSeries_fix/mm/page_alloc.cmm/page_alloc.c +10
-0@@ -3342,6 +3342,16 @@ static void inline setup_usemap(struct p#endif /* CONFIG_SPARSEMEM */ #ifdef CONFIG_HUGETLB_PAGE_SIZE_VARIABLE + +/* Return a sensible default order for the pageblock size. */ +static inline int __init pageblock_default_order (void ) +{ +if (HPAGE_SHIFT >PAGE_SHIFT ) +return HUGETLB_PAGE_ORDER ; + +return MAX_ORDER -1 ; +} +/* Initialise the number of pages represented by NR_PAGEBLOCK_BITS */ static inline void __init set_pageblock_order (unsigned int order) {@@ -3357,7 +3367,7 @@ static inline void __init set_pageblock_ }#else /* CONFIG_HUGETLB_PAGE_SIZE_VARIABLE */
Quoted 5 lines
mm/page_alloc.c static inline void __init set_pageblock_ · line 3370
Quoted 2 lines
mm/page_alloc.c +1
-1-/* Defined this way to avoid accidently referencing HUGETLB_PAGE_ORDER */ +#define pageblock_default_order (x) (0)Shouldn't this have been
HUGETLB_PAGE_ORDER?
As a #define, possibly but as a static inline - definitly not.
In this context, the define is not used because set_pageblock_order() is a no-op when CONFIG_HUGETLB_PAGE_SIZE_VARIABLE is unset. pageblock_default_order() is only defined for symmetry as set_pageblock_order() is defined in both contexts. However, as a #define it might make more sense to a casual reader to see HUGETLB_PAGE_ORDER even if it has no effect. I can send a version of the patch that does this with a comment explaining what is going on with set_pageblock_order() if you like.
However, in a follow-up fix, you make pageblock_default_order() a static inline. If it tries to return HUGETLB_PAGE_ORDER, it will fail to compile when CONFIG_HUGETLB_PAGE is not set.
Which would you prefer?
Quoted 18 lines
Quoted 17 lines
mm/page_alloc.c +1
-1#define set_pageblock_order (x) do {} while (0)#endif /* CONFIG_HUGETLB_PAGE_SIZE_VARIABLE */ @@ -3442,7 +3452,7 @@ static void __meminit free_area_init_corif (!size)continue ; -set_pageblock_order (HUGETLB_PAGE_ORDER ); +set_pageblock_order (pageblock_default_order ());setup_usemap (pgdat, zone, size); ret =init_currently_empty_zone (zone, zone_start_pfn, size,MEMMAP_EARLY );Signature · 4 lines
-- Mel Gorman Part-time Phd Student Linux Technology Center University of Limerick IBM Dublin Software Lab
Signature · 10 lines
-- Mel Gorman Part-time Phd Student Linux Technology Center University of Limerick IBM Dublin Software Lab -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Andrew Morton
maintainerQuoted 13 lines · On Thu, 15 Nov 2007 10:52:38 +0000 [email protected] (Mel Gorman) wrote:
Quoted 2 lines
Shouldn't this have been
HUGETLB_PAGE_ORDER?As a #define, possibly but as a static inline - definitly not.
In this context, the define is not used because
set_pageblock_order()is a no-op whenCONFIG_HUGETLB_PAGE_SIZE_VARIABLEis unset.pageblock_default_order()is only defined for symmetry asset_pageblock_order()is defined in both contexts. However, as a #define it might make more sense to a casual reader to seeHUGETLB_PAGE_ORDEReven if it has no effect. I can send a version of the patch that does this with a comment explaining what is going on withset_pageblock_order()if you like.
Quoted 5 lines
However, in a follow-up fix, you make
pageblock_default_order()a static inline. If it tries to returnHUGETLB_PAGE_ORDER, it will fail to compile whenCONFIG_HUGETLB_PAGEis not set.Which would you prefer?
Don't care really. Something which is fixed up ;)
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>