Commit f2edd118 authored by Song Liu's avatar Song Liu Committed by Linus Torvalds

page_alloc: use vmalloc_huge for large system hash

Use vmalloc_huge() in alloc_large_system_hash() so that large system
hash (>= PMD_SIZE) could benefit from huge pages.

Note that vmalloc_huge only allocates huge pages for systems with
HAVE_ARCH_HUGE_VMALLOC.
Signed-off-by: default avatarSong Liu <song@kernel.org>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarRik van Riel <riel@surriel.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 22da5264
...@@ -8919,7 +8919,7 @@ void *__init alloc_large_system_hash(const char *tablename, ...@@ -8919,7 +8919,7 @@ void *__init alloc_large_system_hash(const char *tablename,
table = memblock_alloc_raw(size, table = memblock_alloc_raw(size,
SMP_CACHE_BYTES); SMP_CACHE_BYTES);
} else if (get_order(size) >= MAX_ORDER || hashdist) { } else if (get_order(size) >= MAX_ORDER || hashdist) {
table = __vmalloc(size, gfp_flags); table = vmalloc_huge(size, gfp_flags);
virt = true; virt = true;
if (table) if (table)
huge = is_vm_area_hugepages(table); huge = is_vm_area_hugepages(table);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment