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: Song Liu <song@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Rik van Riel <riel@surriel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
22da5264ab
commit
f2edd118d0
|
@ -8919,7 +8919,7 @@ void *__init alloc_large_system_hash(const char *tablename,
|
|||
table = memblock_alloc_raw(size,
|
||||
SMP_CACHE_BYTES);
|
||||
} else if (get_order(size) >= MAX_ORDER || hashdist) {
|
||||
table = __vmalloc(size, gfp_flags);
|
||||
table = vmalloc_huge(size, gfp_flags);
|
||||
virt = true;
|
||||
if (table)
|
||||
huge = is_vm_area_hugepages(table);
|
||||
|
|
Loading…
Reference in New Issue