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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);