Re: [PATCH v2] mm/khugepaged: use ALIGN helpers for PMD alignment

From: Ye Liu

Date: Fri Apr 10 2026 - 03:37:24 EST




在 2026/4/10 08:18, SeongJae Park 写道:
> On Thu, 9 Apr 2026 09:43:22 +0800 Ye Liu <ye.liu@xxxxxxxxx> wrote:
>
>> From: Ye Liu <liuye@xxxxxxxxxx>
>>
>> PMD alignment in khugepaged is currently implemented using a mix of
>> rounding helpers and open-coded bitmask operations.
>>
>> Use ALIGN() and ALIGN_DOWN() consistently for PMD-sized address range
>> alignment, matching the preferred style for address and size handling.
>>
>> No functional change intended.
>>
>> Signed-off-by: Ye Liu <liuye@xxxxxxxxxx>
>
> Reviewed-by: SeongJae Park <sj@xxxxxxxxxx>
>
>>
>> Changes in v2:
>> - Switch to ALIGN()/ALIGN_DOWN() per David's suggestion.
>> - Also convert collapse_scan_mm_slot() to keep PMD alignment helpers
>> consistent within khugepaged.
>> - Update the changelog accordingly.
>> - Link to v1:https://lore.kernel.org/all/20260408093534.2373007-1-ye.liu@xxxxxxxxx/
>
> Nit. Changelog should go to the commentary area [1].
>
> [1] https://docs.kernel.org/process/submitting-patches.html#commentary
>
>

Hi SJ,

Thanks for the review, the Reviewed-by, and the helpful note.

Got it. I'll keep the changelog in the commentary area for future revisions.


> Thanks,
> SJ
>
> [...]

--
Thanks,
Ye Liu