Subject: [PATCH] x86, mm: put memory block size probing back commit bdee237c0343 ("x86: mm: Use 2GB memory block size on large-memory x86-64 systems") let system with more than 64GiB ram just use 2G as memory block size without probing. found one system: has memory map like: [0x00000000-0x60000000) [0x100000000-0x20a0000000) We should use 0x20000000 in this case. So can not assume system with big memory have 2g tail anymore. So revert it to put probing back. Fixes: bdee237c0343 ("x86: mm: Use 2GB memory block size on large-memory x86-64 systems") Signed-off-by: Yinghai Lu --- arch/x86/mm/init_64.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) Index: linux-2.6/arch/x86/mm/init_64.c =================================================================== --- linux-2.6.orig/arch/x86/mm/init_64.c +++ linux-2.6/arch/x86/mm/init_64.c @@ -52,6 +52,7 @@ #include #include #include +#include #include #include "mm_internal.h" @@ -1204,10 +1205,12 @@ static unsigned long probe_memory_block_ /* start from 2g */ unsigned long bz = 1UL<<31; - if (totalram_pages >= (64ULL << (30 - PAGE_SHIFT))) { - pr_info("Using 2GB memory block size for large-memory system\n"); +#ifdef CONFIG_X86_UV + if (is_uv_system()) { + printk(KERN_INFO "UV: memory block size 2GB\n"); return 2UL * 1024 * 1024 * 1024; } +#endif /* less than 64g installed */ if ((max_pfn << PAGE_SHIFT) < (16UL << 32))