Re: [PATCH v4 3/7] sched/numa: scan read-only file mappings in tiering mode
From: David Hildenbrand (Arm)
Date: Thu Oct 01 2026 - 06:47:03 EST
On 9/30/26 13:22, Gregory Price wrote:
> From: "Gregory Price (Meta)" <gourry@xxxxxxxxxx>
>
> Commit 4591ce4f2d22 ("sched/numa: Do not trap hinting faults for
> shared libraries") excludes file-backed read-only VMAs from NUMA
> hint faulting to prevent east-west placement bouncing.
>
> This filter hides hot file folios on slow memory from promotion.
>
> Scan those VMAs when tiering is enabled, but make their scans promotion
> only to retain the existing restriction. Keep the historical VMA
> predicate unchanged for backport-ability.
>
> Decide the walk type for each VMA from the balancing-mode snapshot
> taken in task_numa_work(). A VMA gets a placement scan only when normal
> balancing is enabled and it is not a read-only file mapping. Otherwise
> the walk is promotion-only, and without tiering the VMA is skipped as
> before.
>
> On a host with 768 GB of DRAM and 256 GB of CXL memory running two
> database services using ~430GB each, 169 MB of their shared 185 MB
> main binary accumulated on CXL and was permanently stuck there.
>
> With the change, the binary tier residency tracks its runtime hotness.
>
> Fixes: c574bbe91703 ("NUMA balancing: optimize page placement for memory tiering system")
> Cc: stable@xxxxxxxxxxxxxxx
> Assisted-by: LLM
> Signed-off-by: Gregory Price (Meta) <gourry@xxxxxxxxxx>
> ---
Acked-by: David Hildenbrand (Arm) <david@xxxxxxxxxx>
--
Cheers,
David