Re: [RFC PATCH v3 1/3] mm/damon: introduce DAMOS_SPLIT action
From: Lian Wang
Date: Mon Jul 20 2026 - 06:02:53 EST
On Mon, 20 Jul 2026 12:47:23 +0300 Gutierrez Asier <gutierrez.asier@xxxxxxxxxxxxxxxxxxx> wrote:
>
>
> On 7/20/2026 6:03 AM, Lian Wang wrote:
> > Add a new DAMOS action, DAMOS_SPLIT, that splits large folios in the
> > target region down to a smaller order. A new per-scheme field and sysfs
> > file, target_order, selects the split target: 0 for order-0 base pages,
> > or 2..HPAGE_PMD_ORDER-1 for a smaller mTHP order (order-1 is rejected at
> > store time since anonymous THPs cannot be split to order-1).
> >
> > Unlike DAMOS_COLLAPSE which builds large folios, splitting only dismantles
> > them; it allocates nothing, copies nothing, and no THP admission policy
> > applies. khugepaged deliberately refuses to collapse a folio to a
> > smaller order, leaving the shrink direction to callers like this one.
> >
> > This patch adds the DAMOS_SPLIT action, the ``order`` field (placed in
> > the existing union alongside target_nid and migrate_dests), its sysfs
> > interface, and documentation. The vaddr operations set handler is added
> > in the next patch.
> >
> > Link: https://lore.kernel.org/20260605161422.213817-9-npache@xxxxxxxxxx/
> > ("mm/khugepaged: skip collapsing mTHP to smaller orders")
Hi Asier,
Thanks for the review. All three points noted -- will address them
in the next revision along with feedback from David and others.
Thanks,
Lian Wang