[PATCH 42/46] mm/huge_memory: split huge PUDs when adjusting VMA boundaries

David Hildenbrand (Arm) david at kernel.org
Thu Oct 29 07:40:06 PDT 2026


On 10/29/26 15:31, Kiryl Shutsemau wrote:
> On Thu, Oct 29, 2026 at 03:24:29PM +0100, David Hildenbrand (Arm) wrote:
>> On 10/29/26 12:45, Kiryl Shutsemau wrote:
>>>
>>> This looks wrong.
>>>
>>> We should bail out here if PUD is was a leaf and wasn't split.
>>
>> __split_huge_pud() must split a leave. Either by zapping it (what we do right
>> now) or by populating page tables (as in Usama's PoC).
> 
> No, meant the situation when pud_leaf() is true, but split_pud is false,
> so __split_huge_pud() is never hit. pud_present() is true so we proceed
> to pmd_offset()

Oh, yeah, I can add a WARN_ON_ONCE() for that, it would be a bug in the software.

I was a bit careful in pud_split_required() to not harm performance of things
that don't need a split because pud leaves (should be) are impossible.

-- 
Cheers,

David



More information about the kexec mailing list