Re: [PATCH v6 03/12] mm: add PMD swap entry splitting support

From: David Hildenbrand (Arm)

Date: Wed Aug 19 2026 - 12:05:43 EST


> m
>>
>>
>>> + old_pmd = *pmd;
>>> + soft_dirty = pmd_swp_soft_dirty(old_pmd);
>>> + uffd_wp = pmd_swp_uffd(old_pmd);
>>> + anon_exclusive = pmd_swp_exclusive(old_pmd);
>>> } else {
>>> /*
>>> * Up to this point the pmd is present and huge and userland has
>>> @@ -3388,6 +3396,25 @@ static void __split_huge_pmd_locked(struct vm_area_struct *vma, pmd_t *pmd,
>>> VM_WARN_ON(!pte_none(ptep_get(pte + i)));
>>> set_pte_at(mm, addr, pte + i, entry);
>>> }
>>> + } else if (pmd_is_swap_entry(old_pmd)) {
>>> + softleaf_t sl_entry = softleaf_from_pmd(old_pmd);
>>
>> No existing code uses "sl_entry". Maybe just call it "pmd_swp_entry"/"swp_entry"
>> and below "pte_swp_entry".
>>
>
> Thanks! Will do in next revision
Thanks, that will improve the code :)

--
Cheers,

David