Re: [PATCH 00/12] mm/collapse: separate a collapse from its callers
From: Kiryl Shutsemau
Date: Mon Sep 07 2026 - 06:33:48 EST
On Sat, Sep 05, 2026 at 05:23:42PM -0700, Andrew Morton wrote:
> > Behaviour
> > =========
> >
> > Nothing here changes what gets collapsed. Three things a reader should
> > not have to find in the diff:
> >
> > - Patch 5: khugepaged fills its policy once per scan pass, so the
> > max_ptes_* limits and the defrag setting behind the allocation mask are
> > sampled once per pass rather than once per table. A table scanned early
> > in a pass and one scanned late are then judged alike, where before a
> > knob written mid-pass split them.
> >
> > - Patch 8: mm_khugepaged_scan_pmd fires before mm_collapse_huge_page
> > rather than after it, the scan having returned before the collapse
> > runs. Its status field already reads SCAN_SUCCEED for an accepted
> > table, so nothing changes there; what the collapse then made of the
> > table is mm_collapse_huge_page's to report, per order.
> >
> > - Patch 10: which orders a table is scanned for is sampled once per VMA
> > rather than once per table. It cannot widen what a collapse does --
> > the order is tested again under the lock the collapse retakes.
>
> So is *any* functional change expected with this series?
No.
The three items here are so nobody has to find them in the diff, and
calling them behaviour changes is a stretch: a sysfs knob written
mid-pass takes effect on the next pass instead of the next table, and a
tracepoint fires a few lines earlier with the same arguments.
> I'm reluctant to merge an unreviewed v1, but this comes close! I'll
> sit on it for a week or less, see what people say. Please poke me
> if/when you think it's good for mm-new.
Zi and Baolin have already provided enough feedback to justify v2.
--
Kiryl Shutsemau / Kirill A. Shutemov