From: "Vladimir Vdovin" <deliran@verdict.gg>
To: "Andrea Righi" <arighi@nvidia.com>, "Tejun Heo" <tj@kernel.org>,
"David Vernet" <void@manifault.com>,
"Changwoo Min" <changwoo@igalia.com>
Cc: "Ingo Molnar" <mingo@redhat.com>,
"Peter Zijlstra" <peterz@infradead.org>,
"Juri Lelli" <juri.lelli@redhat.com>,
"Vincent Guittot" <vincent.guittot@linaro.org>,
"Dietmar Eggemann" <dietmar.eggemann@arm.com>,
"Steven Rostedt" <rostedt@goodmis.org>,
"Ben Segall" <bsegall@google.com>, "Mel Gorman" <mgorman@suse.de>,
"Valentin Schneider" <vschneid@redhat.com>,
"K Prateek Nayak" <kprateek.nayak@amd.com>,
"Vladimir Vdovin" <deliran@verdict.gg>,
"Emil Tsalapatis" <etsal@meta.com>,
"Christian Loehle" <christian.loehle@arm.com>,
"Balbir Singh" <balbirs@nvidia.com>,
"Lee Trager" <ltrager@nvidia.com>, <sched-ext@lists.linux.dev>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCHSET sched_ext/for-7.4] sched_ext: Add NUMA balancing support
Date: Tue, 06 Oct 2026 17:40:35 +0300 [thread overview]
Message-ID: <DLXU0LDPUUSG.2JN9ZOB6YMU07@verdict.gg> (raw)
In-Reply-To: <20261004072901.3579967-1-arighi@nvidia.com>
Hi Andrea,
On Sun, Oct 04, 2026 at 09:27:06AM +0200, Andrea Righi wrote:
> Tasks running under a BPF scheduler are currently invisible to NUMA balancing:
> their address space is never scanned for hinting faults, so they never record
> NUMA fault statistics and never acquire a preferred node.
In case it's useful, I gave patches 1-3 a try on one of our KVM hosts,
backported to 6.18.54 and running our in-house sched_ext scheduler.
It's not exactly the series as posted: to avoid changing the scheduler,
the backport drops SCX_OPS_NUMA_BALANCING and drives the scan for all
sched_ext tasks under the sched_numa_balancing static key alone, and it
passes curr, as there is no donor there on 6.18. The fair.c parts are
the same.
As a controlled check, I used a stress-ng --vm worker touching 4G,
pinned to a CPU on node 0 and then moved to a CPU on node 1 with
taskset.
Without the patches, under the same scheduler, mm->numa_scan_seq stays
at 0, numa_preferred_nid stays at -1, numa_pte_updates in /proc/vmstat
doesn't move, and all 4G stay on node 0.
With the backport:
- mm->numa_scan_seq advances (7 to 12 over two minutes);
- numa_preferred_nid is 0 before the move and 1 about 20s after it;
- the whole 4G (~1M pages) is migrated to node 1 within ~20s;
- the task stays on the CPU it was pinned to.
On an otherwise idle host, the vCPU threads of a running guest now get
task_numa_work() calls as well. On a host running the same scheduler
without the patches, a kprobe on task_numa_work() sees no calls at all
in 30s, as task_tick_numa() is only reached from task_tick_fair().
Thanks for working on this,
Vladimir
prev parent reply other threads:[~2026-10-06 14:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-04 7:27 Andrea Righi
2026-10-04 7:27 ` [PATCH 1/5] sched/numa: Let other scheduling classes drive NUMA scanning Andrea Righi
2026-10-04 7:27 ` [PATCH 2/5] sched/numa: Leave the placement of a BPF-scheduled task to its scheduler Andrea Righi
2026-10-04 7:27 ` [PATCH 3/5] sched_ext: Scan NUMA hinting faults for opted-in BPF schedulers Andrea Righi
2026-10-05 11:30 ` Vladimir Vdovin
2026-10-05 21:37 ` Andrea Righi
2026-10-04 7:27 ` [PATCH 4/5] sched_ext: Add scx_bpf_task_numa_nid() Andrea Righi
2026-10-04 7:27 ` [PATCH 5/5] selftests/sched_ext: Add a test for scx_bpf_task_numa_nid() Andrea Righi
2026-10-06 14:40 ` Vladimir Vdovin [this message]
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=DLXU0LDPUUSG.2JN9ZOB6YMU07@verdict.gg \
--to=deliran@verdict.gg \
--cc=arighi@nvidia.com \
--cc=balbirs@nvidia.com \
--cc=bsegall@google.com \
--cc=changwoo@igalia.com \
--cc=christian.loehle@arm.com \
--cc=dietmar.eggemann@arm.com \
--cc=etsal@meta.com \
--cc=juri.lelli@redhat.com \
--cc=kprateek.nayak@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ltrager@nvidia.com \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=sched-ext@lists.linux.dev \
--cc=tj@kernel.org \
--cc=vincent.guittot@linaro.org \
--cc=void@manifault.com \
--cc=vschneid@redhat.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®