Skip to content

Commit f2edd11

Browse files
liu-song-6torvalds
authored andcommitted
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>
1 parent 22da526 commit f2edd11

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mm/page_alloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8919,7 +8919,7 @@ void *__init alloc_large_system_hash(const char *tablename,
89198919
table = memblock_alloc_raw(size,
89208920
SMP_CACHE_BYTES);
89218921
} else if (get_order(size) >= MAX_ORDER || hashdist) {
8922-
table = __vmalloc(size, gfp_flags);
8922+
table = vmalloc_huge(size, gfp_flags);
89238923
virt = true;
89248924
if (table)
89258925
huge = is_vm_area_hugepages(table);

0 commit comments

Comments
 (0)