The patch titled Subject: mm/large system hash: use vmalloc for size > MAX_ORDER when !hashdist has been removed from the -mm tree. Its filename was mm-large-system-hash-use-vmalloc-for-size-max_order-when-hashdist.patch This patch was dropped because an updated version will be merged ------------------------------------------------------ From: Nicholas Piggin <npiggin@xxxxxxxxx> Subject: mm/large system hash: use vmalloc for size > MAX_ORDER when !hashdist The kernel currently clamps large system hashes to MAX_ORDER when hashdist is not set, which is rather arbitrary. vmalloc space is limited on 32-bit machines, but this shouldn't result in much more used because of small physical memory limiting system hash sizes. Link: http://lkml.kernel.org/r/20190528120453.27374-1-npiggin@xxxxxxxxx Signed-off-by: Nicholas Piggin <npiggin@xxxxxxxxx> Cc: Toshi Kani <toshi.kani@xxxxxx> Cc: Ard Biesheuvel <ard.biesheuvel@xxxxxxxxxx> Cc: Uladzislau Rezki <urezki@xxxxxxxxx> Cc: Mike Rapoport <rppt@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/page_alloc.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) --- a/mm/page_alloc.c~mm-large-system-hash-use-vmalloc-for-size-max_order-when-hashdist +++ a/mm/page_alloc.c @@ -8029,7 +8029,7 @@ void *__init alloc_large_system_hash(con else table = memblock_alloc_raw(size, SMP_CACHE_BYTES); - } else if (hashdist) { + } else if (get_order(size) >= MAX_ORDER || hashdist) { table = __vmalloc(size, gfp_flags, PAGE_KERNEL); } else { /* @@ -8037,10 +8037,8 @@ void *__init alloc_large_system_hash(con * some pages at the end of hash table which * alloc_pages_exact() automatically does */ - if (get_order(size) < MAX_ORDER) { - table = alloc_pages_exact(size, gfp_flags); - kmemleak_alloc(table, size, 1, gfp_flags); - } + table = alloc_pages_exact(size, gfp_flags); + kmemleak_alloc(table, size, 1, gfp_flags); } } while (!table && size > PAGE_SIZE && --log2qty); _ Patches currently in -mm which might be from npiggin@xxxxxxxxx are mm-large-system-hash-avoid-vmap-for-non-numa-machines-when-hashdist.patch mm-move-ioremap-page-table-mapping-function-to-mm.patch mm-vmalloc-hugepage-vmalloc-mappings.patch