mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Li Zhe" <lizhe.67@bytedance.com>
To: "Gregory Price" <gourry@gourry.net>
Cc: <akpm@linux-foundation.org>, <david@kernel.org>, <ljs@kernel.org>,
	 <joshua.hahnjy@gmail.com>, <ziy@nvidia.com>, <mingo@redhat.com>,
	 <peterz@infradead.org>, <mgorman@suse.de>, <riel@redhat.com>,
	 <juri.lelli@redhat.com>, <vincent.guittot@linaro.org>,
	 <dietmar.eggemann@arm.com>, <rostedt@goodmis.org>,
	<bsegall@google.com>,  <vschneid@redhat.com>,
	<kprateek.nayak@amd.com>,  <linux-doc@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,  <linux-mm@kvack.org>
Subject: Re: [PATCH 3/6] sched/numa: fix scan-period adjustment for shared faults
Date: Thu, 15 Oct 2026 19:39:42 +0800	[thread overview]
Message-ID: <9b9e6c92-a291-48b4-a128-c31bc718db7a@bytedance.com> (raw)
In-Reply-To: <as9_SwmLxAcTovnl@gourry-fedora-PF4VCD3F>

On 10/14/26 9:12 PM, Gregory Price wrote:
> 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?


Thanks for the review.

I do not have convincing performance numbers to show that this is broadly
beneficial across workloads. NUMA balancing heuristics are
workload-dependent, and my motivation here was mainly the consistency of
the scan-period decision logic rather than a broad performance claim.

The same concern also applies to patches 5 and 6. They were written from
the code/semantic correctness side, but I do not have convincing workload
numbers to show that they are broadly beneficial.

For `update_task_scan_period()`, there is a more concrete issue in the
memory-tiering-only case. The function currently depends on normal NUMA
placement fault statistics. In memory-tiering-only mode, when there is no
useful normal-placement feedback, it can keep taking the slow-down path
and grow the scan period towards the maximum. I am testing a separate
patch locally to handle the memory-tiering-only scan feedback explicitly.

So I think I should separate the severe fixes from the heuristic changes.
For the latter, I will narrow the next version to NUMA balancing behavior
that is specific to memory tiering, instead of trying to justify the
changes as general improvements for normal NUMA balancing workloads.

Thanks,
Zhe

>
> ~Gregory

  reply	other threads:[~2026-10-15 11:40 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-14  9:43 [PATCH 0/6] sched/numa: fix several NUMA balancing issues Li Zhe
2026-10-14  9:43 ` [PATCH 1/6] sched/numa: clear fault locality state on execve Li Zhe
2026-10-14 13:02   ` Gregory Price
2026-10-15  3:41     ` Li Zhe
2026-10-14  9:43 ` [PATCH 2/6] sched/numa: fix scan-period ratio denominator checks Li Zhe
2026-10-14 12:56   ` Gregory Price
2026-10-15  3:49     ` Li Zhe
2026-10-14  9:43 ` [PATCH 3/6] sched/numa: fix scan-period adjustment for shared faults Li Zhe
2026-10-14 13:12   ` Gregory Price
2026-10-15 11:39     ` Li Zhe [this message]
2026-10-15 16:02       ` Gregory Price
2026-10-14  9:43 ` [PATCH 4/6] sched/numa: make free-space tiering promotion bypass configurable Li Zhe
2026-10-14 13:16   ` Gregory Price
2026-10-15  4:09     ` Li Zhe
2026-10-14  9:43 ` [PATCH 5/6] sched/numa: do not feed tiering promotions into task placement stats Li Zhe
2026-10-14 13:26   ` Gregory Price
2026-10-15  5:07   ` kernel test robot
2026-10-15  5:07   ` kernel test robot
2026-10-14  9:43 ` [PATCH 6/6] sched/numa: ignore preferred nodes without normal balancing Li Zhe
2026-10-14 13:30   ` Gregory Price
2026-10-15 11:44     ` Li Zhe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9b9e6c92-a291-48b4-a128-c31bc718db7a@bytedance.com \
    --to=lizhe.67@bytedance.com \
    --cc=akpm@linux-foundation.org \
    --cc=bsegall@google.com \
    --cc=david@kernel.org \
    --cc=dietmar.eggemann@arm.com \
    --cc=gourry@gourry.net \
    --cc=joshua.hahnjy@gmail.com \
    --cc=juri.lelli@redhat.com \
    --cc=kprateek.nayak@amd.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ljs@kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=riel@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.com \
    --cc=ziy@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®