diff options
author | Song Liu <song@kernel.org> | 2022-04-15 09:44:11 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-04-24 10:00:54 -0700 |
commit | f2edd118d02dd11449b126f786f09749ca152ba5 (patch) | |
tree | 2d3b9a1a32f41ec6bacaed9fd3cadb7b733bca2d | |
parent | 22da5264abf497a10a4ed629f07f4ba28a7ed5eb (diff) | |
download | linux-rpi-f2edd118d02dd11449b126f786f09749ca152ba5.tar.gz linux-rpi-f2edd118d02dd11449b126f786f09749ca152ba5.tar.bz2 linux-rpi-f2edd118d02dd11449b126f786f09749ca152ba5.zip |
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>
-rw-r--r-- | mm/page_alloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 33ca8cab21e6..0e42038382c1 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -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); |