From: "David Hildenbrand (Arm)" <david@kernel.org>
To: Mike Rapoport <rppt@kernel.org>, Muchun Song <muchun.song@linux.dev>
Cc: Muchun Song <songmuchun@bytedance.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, Lorenzo Stoakes <ljs@kernel.org>,
"Liam R. Howlett" <Liam.Howlett@oracle.com>,
Vlastimil Babka <vbabka@kernel.org>,
Suren Baghdasaryan <surenb@google.com>,
Michal Hocko <mhocko@suse.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/5] mm/sparse-vmemmap: provide generic vmemmap_set_pmd() and vmemmap_check_pmd()
Date: Fri, 24 Apr 2026 14:29:49 +0200 [thread overview]
Message-ID: <4b30e014-2746-47d9-a122-554572271d9b@kernel.org> (raw)
In-Reply-To: <adeC--_dkgWHdSPj@kernel.org>
On 4/9/26 12:44, Mike Rapoport wrote:
> On Sun, Apr 05, 2026 at 10:07:36PM +0800, Muchun Song wrote:
>>>
>>> Do we have to crash the kernel here?
>>> Wouldn't be better to make vmemmap_set_pmd() return error and make
>>> vmemmap_populate_hugepages() fall back to base pages in case
>>> vmemmap_set_pmd() errored?
>>
>> Hi Mike,
>>
>> Thanks for the review. Let me explain my original thought process here.
>>
>> My assumption was that pmd_set_huge() for the kernel virtual address space
>> should rarely, if ever, fail in this context. Furthermore, if we look at the
>> architectures this patch replaces (e.g., arm64 and riscv), they are either
>> ignoring the return value of pmd_set_huge() entirely or lacking any graceful
>> fallback mechanism anyway.
>>
>> So, to keep the initial generic implementation as simple as possible, I used
>> BUG_ON() as a strict assertion.
>
> Fair enough, let's just make it VM_BUG_ON().
VM_WARN_ON_* please.
--
Cheers,
David
next prev parent reply other threads:[~2026-04-24 12:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-04 12:20 [PATCH v2 0/5] mm/sparse-vmemmap: provide generic vmemmap_set_pmd() and vmemmap_check_pmd() Muchun Song
2026-04-04 12:20 ` [PATCH v2 1/5] " Muchun Song
2026-04-05 7:07 ` Mike Rapoport
2026-04-05 14:07 ` Muchun Song
2026-04-09 10:44 ` Mike Rapoport
2026-04-24 12:29 ` David Hildenbrand (Arm) [this message]
2026-04-04 12:20 ` [PATCH v2 2/5] arm64/mm: drop vmemmap_pmd helpers and use generic code Muchun Song
2026-04-04 12:20 ` [PATCH v2 3/5] riscv/mm: " Muchun Song
2026-04-04 12:20 ` [PATCH v2 4/5] loongarch/mm: drop vmemmap_check_pmd helper " Muchun Song
2026-04-04 12:20 ` [PATCH v2 5/5] sparc/mm: " Muchun Song
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=4b30e014-2746-47d9-a122-554572271d9b@kernel.org \
--to=david@kernel.org \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=mhocko@suse.com \
--cc=muchun.song@linux.dev \
--cc=rppt@kernel.org \
--cc=songmuchun@bytedance.com \
--cc=surenb@google.com \
--cc=vbabka@kernel.org \
/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