From: Andrea Righi <arighi@nvidia.com>
To: Vladimir Vdovin <deliran@verdict.gg>
Cc: Tejun Heo <tj@kernel.org>, David Vernet <void@manifault.com>,
Changwoo Min <changwoo@igalia.com>,
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>,
Emil Tsalapatis <etsal@meta.com>,
Christian Loehle <christian.loehle@arm.com>,
Balbir Singh <balbirs@nvidia.com>,
Lee Trager <ltrager@nvidia.com>, Hui Su <sh_def@163.com>,
sched-ext@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/5] sched_ext: Scan NUMA hinting faults for opted-in BPF schedulers
Date: Mon, 5 Oct 2026 23:37:30 +0200 [thread overview]
Message-ID: <asQYmmrL2SyhZ4sb@gpd4> (raw)
In-Reply-To: <DLWVCRDZK3XK.1JG5J57YQV0VI@verdict.gg>
Hi Vladimir,
On Mon, Oct 05, 2026 at 02:30:50PM +0300, Vladimir Vdovin wrote:
> Hi Andrea,
>
> Thanks for putting this together so quickly, and for picking up the RFC.
>
> On Sun, Oct 04, 2026 at 09:27:09AM +0200, Andrea Righi wrote:
> > + if (!queued && (sch->ops.flags & SCX_OPS_NUMA_BALANCING) &&
> > + static_branch_unlikely(&sched_numa_balancing))
> > + task_tick_numa(rq, donor);
>
> One question about proxy execution, which I may well be missing context
> on. Hui Su's tick series moves the fair NUMA tick to the execution
> context, with the reasoning that task_tick_numa() works on the mm and
> NUMA work state of the task that is actually running:
>
> https://lore.kernel.org/r/20260909092901.2989564-3-sh_def@163.com
>
> Here the scan is driven from the donor. I understand that in your proxy
> execution integration SCX runtime is accounted to the donor, so maybe
> this is intentional to keep the pacing consistent, but then the scan
> would cover the donor's address space rather than the one being
> accessed. Is the donor the intended choice here, or should this follow
> rq->curr once SCHED_PROXY_EXEC no longer depends on !SCHED_CLASS_EXT?
>
> Thanks,
> Vladimir
Yes, that's a good point, thanks for brining this up. The donor here is used
just for consistency with the current task_tick_fair() implementation.
A small clarification on the accounting: under proxy exec, sched_ext charges the
slice to the donor (update_curr_scx() decrements donor->scx.slice), but the task
runtime, p->se.sum_exec_runtime, is charged to rq->curr by update_se(). Since
task_tick_numa() paces the scan on sum_exec_runtime, passing the donor means its
scan does not progress while it's blocked, which is fine, and the owner's scan
is delayed until it gets ticks on its own. So nothing is scanned on the wrong
mm: task_tick_numa(rq, p) checks whether p is due for a scan and, if so, queues
p's scan as task work, which runs later in p's own context and p's own mm. The
owner never scans the donor's memory or the other way around. Essentially, the
only effect of passing the donor is timing: during the proxy window the donor's
scan may get queued, while the owner's scan waits until the owner is schedued on
its own behalf.
That said, I agree the scan should follow rq->curr and Hui's series gives the
right hook to do it. But I'd rather not diverge from fair for now, so the idea
would be to keep the donor here and switch sched_ext together with fair when
Hui's series lands.
Thanks,
-Andrea
next prev parent reply other threads:[~2026-10-05 21:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-04 7:27 [PATCHSET sched_ext/for-7.4] sched_ext: Add NUMA balancing support 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 [this message]
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 ` [PATCHSET sched_ext/for-7.4] sched_ext: Add NUMA balancing support Vladimir Vdovin
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=asQYmmrL2SyhZ4sb@gpd4 \
--to=arighi@nvidia.com \
--cc=balbirs@nvidia.com \
--cc=bsegall@google.com \
--cc=changwoo@igalia.com \
--cc=christian.loehle@arm.com \
--cc=deliran@verdict.gg \
--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=sh_def@163.com \
--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®