Re: [PATCH 3/6] sched/numa: fix scan-period adjustment for shared faults
From: Gregory Price
Date: Wed Oct 14 2026 - 09:21:00 EST
On Wed, Oct 14, 2026 at 05:43:44PM +0800, Li Zhe wrote:
> Commit 37ec97deb3a8 ("sched/numa: Slow down scan rate if shared faults
> dominate") intended to slow scanning when either shared or local faults
> dominate, and to speed scanning up only when many private faults are on
> remote memory pages.
>
> The implementation uses the private-fault ratio as the slow-scan signal.
> That makes private-dominated samples slow scanning, while
> shared-dominated samples can still fall through to the speed-up path.
> That does not match the stated intent.
>
> Replacing the private ratio with a shared ratio fixes the
> shared-dominated case, but the scan-period code still only has separate
> locality and sharing ratios. Those ratios cannot distinguish a window
> with many remote shared faults and only a few remote private faults from
> one with substantial remote private faults.
>
> Track faults that are both remote and private, and only speed up scanning
> when that signal is large enough. This keeps local or shared samples
> slowing scanning and avoids extra hinting overhead when the remote
> activity is mostly shared.
>
This changes NUMA balancing behavior that's been around since 2017.
While it's not the stated intent, it's been consistent since then,
and i'm concerned that this could cause unexpected regressions.
Do you have performance numbers on this change to show it's actually
beneficial compared to the existing behavior?
~Gregory