From: Muchun Song <muchun.song@linux.dev>
To: Dheeraj Kumar Srivastava <dheerajkumar.srivastava@amd.com>
Cc: osalvador@suse.de, david@kernel.org, akpm@linux-foundation.org,
davidlohr@hp.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, Vasant.Hegde@amd.com,
bharata@amd.com, dheerajkumar.srivastava@amd.com
Subject: Re: [PATCH v2] mm/hugetlb: use kvmalloc_objs for hugetlb_fault_mutex_table
Date: Wed, 7 Oct 2026 07:10:08 +0200 [thread overview]
Message-ID: <5714BF9B-9FE3-41DC-A215-EEAAEBD7F9D3@linux.dev> (raw)
In-Reply-To: <20261006160128.31447-1-dheerajkumar.srivastava@amd.com>
> On Oct 6, 2026, at 18:02, Dheeraj Kumar Srivastava <dheerajkumar.srivastava@amd.com> wrote:
>
> 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.
>
> Fixes: 8382d914ebf7 ("mm, hugetlb: improve page-fault scalability")
> Signed-off-by: Dheeraj Kumar Srivastava <dheerajkumar.srivastava@amd.com>
Thanks for your fix.
Acked-by: Muchun Song <muchun.song@linux.dev>
Thanks
prev parent reply other threads:[~2026-10-07 6:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-06 16:01 Dheeraj Kumar Srivastava
2026-10-06 16:09 ` Dheeraj Kumar Srivastava
2026-10-07 5:10 ` Muchun Song [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5714BF9B-9FE3-41DC-A215-EEAAEBD7F9D3@linux.dev \
--to=muchun.song@linux.dev \
--cc=Vasant.Hegde@amd.com \
--cc=akpm@linux-foundation.org \
--cc=bharata@amd.com \
--cc=david@kernel.org \
--cc=davidlohr@hp.com \
--cc=dheerajkumar.srivastava@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=osalvador@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®