Re: [PATCH 4/8] mm/khugepaged: fix outdated comments

From: Usama Arif

Date: Mon Jul 06 2026 - 13:27:16 EST


On Mon, 6 Jul 2026 09:44:51 -0600 Nico Pache <npache@xxxxxxxxxx> wrote:

> Fix comment in collapse_scan_pmd() that still described the old
> folio_mapcount() > folio_ref_count() check and a "512" false-positive
> scenario. The code now uses folio_expected_ref_count() != folio_ref_count()
> which doesn't suffer from the same limitation.
>
> Fix comment in collapse_huge_page() that referenced ptep_clear_flush,
> when the code actually uses pmdp_collapse_flush.
>
> Fix comment in __collapse_huge_page_swapin() that referenced the old
> function name khugepaged_scan_pmd, now collapse_scan_pmd.
>
> Also clean up some simple typos and stale terminology (mmap_sem ->
> mmap_lock, PG_lock -> folio lock, page -> folio, grammar).
>
> Assisted-by: Cursor(claude-sonnet-4):4.6
> Signed-off-by: Nico Pache <npache@xxxxxxxxxx>
> ---
> mm/khugepaged.c | 23 ++++++++++-------------
> 1 file changed, 10 insertions(+), 13 deletions(-)
>

Acked-by: Usama Arif <usama.arif@xxxxxxxxx>