Skip to content

Commit bdee237

Browse files
dbluemanKAGA-KOKO
authored andcommitted
x86: mm: Use 2GB memory block size on large-memory x86-64 systems
On large-memory x86-64 systems of 64GB or more with memory hot-plug enabled, use a 2GB memory block size. Eg with 64GB memory, this reduces the number of directories in /sys/devices/system/memory from 512 to 32, making it more manageable, and reducing the creation time accordingly. This caveat is that the memory can't be offlined (for hotplug or otherwise) with the finer default 128MB granularity, but this is unimportant due to the high memory densities generally used with such large-memory systems, where eg a single DIMM is the order of 16GB. Signed-off-by: Daniel J Blueman <[email protected]> Cc: Steffen Persvold <[email protected]> Cc: Bjorn Helgaas <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
1 parent 63e7b6d commit bdee237

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

arch/x86/mm/init_64.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
#include <asm/numa.h>
5353
#include <asm/cacheflush.h>
5454
#include <asm/init.h>
55-
#include <asm/uv/uv.h>
5655
#include <asm/setup.h>
5756

5857
#include "mm_internal.h"
@@ -1247,12 +1246,10 @@ static unsigned long probe_memory_block_size(void)
12471246
/* start from 2g */
12481247
unsigned long bz = 1UL<<31;
12491248

1250-
#ifdef CONFIG_X86_UV
1251-
if (is_uv_system()) {
1252-
printk(KERN_INFO "UV: memory block size 2GB\n");
1249+
if (totalram_pages >= (64ULL << (30 - PAGE_SHIFT))) {
1250+
pr_info("Using 2GB memory block size for large-memory system\n");
12531251
return 2UL * 1024 * 1024 * 1024;
12541252
}
1255-
#endif
12561253

12571254
/* less than 64g installed */
12581255
if ((max_pfn << PAGE_SHIFT) < (16UL << 32))

0 commit comments

Comments
 (0)