diff options
| author | Dheeraj Kumar Srivastava <dheerajkumar.srivastava@amd.com> | 2026-10-06 21:31:28 +0530 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2026-10-08 23:06:26 -0700 |
| commit | 64b19c8ba796069c250587731f448da90bdd2dad (patch) | |
| tree | 3aba064104eb81ec15b00233e0dea70f5056a09d /tools/lib/python/kdoc/python_version.py | |
| parent | 1b6fd13abfd478c74c0dcf7a2eddfd3a20c98209 (diff) | |
| download | linux-next-64b19c8ba796069c250587731f448da90bdd2dad.tar.gz linux-next-64b19c8ba796069c250587731f448da90bdd2dad.zip | |
mm/hugetlb: use kvmalloc_objs for hugetlb_fault_mutex_table
On systems/VMs with a large number of CPUs (e.g. 4096), hugetlb_init()
computes num_fault_mutexes = roundup_pow_of_two(8 * num_possible_cpus()) =
32768. The subsequent kmalloc for the mutex table can exceed
MAX_PAGE_ORDER when struct mutex is enlarged by debug options like
CONFIG_DEBUG_MUTEXES and CONFIG_DEBUG_LOCK_ALLOC, resulting in:
WARNING: at __alloc_frozen_pages_noprof (order > MAX_PAGE_ORDER)
kernel BUG at mm/hugetlb.c (BUG_ON(!hugetlb_fault_mutex_table))
Kernel panic - not syncing: Fatal exception
Switch to kvmalloc_objs() so the allocation falls back to vmalloc when the
contiguous physical allocation is too large. The table is only accessed
by index, so virtual contiguity is sufficient.
Link: https://lore.kernel.org/20261006160128.31447-1-dheerajkumar.srivastava@amd.com
Fixes: 8382d914ebf7 ("mm, hugetlb: improve page-fault scalability")
Signed-off-by: Dheeraj Kumar Srivastava <dheerajkumar.srivastava@amd.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Muchun Song <muchun.song@linux.dev>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: David Hildenbrand <david@kernel.org>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: Vasant Hegde <vasant.hegde@amd.com>
Cc: Bharata B Rao <bharata@amd.com>
Diffstat (limited to 'tools/lib/python/kdoc/python_version.py')
0 files changed, 0 insertions, 0 deletions
