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-24 01:56:25 -0700 |
| commit | fa71cee86530039392094103aab713ba8ba9e301 (patch) | |
| tree | a84d1af620d0abc264791258ca12720f398058f6 /tools/perf/scripts/python/export-to-sqlite.py | |
| parent | ecaccc8c889e7cefcde88b70663d2a8704c41ca7 (diff) | |
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/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions
