From: K Prateek Nayak <kprateek.nayak@amd.com>
To: Andrea Righi <arighi@nvidia.com>
Cc: Dietmar Eggemann <dietmar.eggemann@arm.com>,
Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Steven Rostedt <rostedt@goodmis.org>,
Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
Valentin Schneider <vschneid@redhat.com>,
Christian Loehle <christian.loehle@arm.com>,
Koba Ko <kobak@nvidia.com>,
Felix Abecassis <fabecassis@nvidia.com>,
Balbir Singh <balbirs@nvidia.com>,
Shrikanth Hegde <sshegde@linux.ibm.com>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] sched/fair: Prefer fully-idle SMT cores in asym-capacity idle selection
Date: Mon, 20 Apr 2026 15:09:17 +0530 [thread overview]
Message-ID: <1230f5df-470a-4e59-8c8e-fa159a6fc093@amd.com> (raw)
In-Reply-To: <aeXlhktdf3ruhMf3@gpd4>
Hello Andrea,
On 4/20/2026 2:06 PM, Andrea Righi wrote:
>> With your changes, only two places actually care about test_idle_cores():
>>
>> - select_idle_capacity()
>> - select_idle_cpu()
>>
>> If we go into select_idle_capacity(), we don't do select_idle_cpu() so
>> the two paths are mutually exclusive.
>>
>> In nohz_balancer_kick(), if we find, sd_asym_cpucapacity, we simply
>> don't care about the sd_llc_shared->nr_busy_cpus during balancing so
>> that begs the question if we can simply track idle_cores at
>> sd_asym_cpucapacity for these systems?
>
> Yeah, makes sense to me. I was planning to test something similar, so thanks for
> sharing this patch. :) I'll give it a try and report back.
Thank you for taking it for a spin!
[..snip..]
>> I still have one question: Can first SD_ASYM_CPUCAPACITY_FULL be set at
>> a SD_NUMA?
>>
>> We'll need to deal with overlapping domains then but seems like it could
>> be possible with weird cpusets :-(
>>
>> But in that case, do we even want to search CPUs outside the NUMA in
>> select_idle_capacity()? I don't think anything stops this currently but
>> I might be wrong.
>
> My $0.02 on this.
>
> In theory it could happen with unusual topologies or constrained cpusets,
> although it should be quite rare. That said, select_idle_capacity() already
> operates on the span of sd_asym_cpucapacity, so if that domain crosses NUMA
> boundaries, we're already scanning across NUMA today. This patch doesn't
> fundamentally alter this behavior.
Ack! I was just thinking loud from the topology standpoint since
sd->shared is not designed to handle the overlapping domains like
sg->sgc does but we can probably figure some way to make it work.
Using the ring topology example from topology.c:
0 ----- 1
| |
| |
| |
3 ----- 2
Consider NUMA-1 below gets the SD_ASYM_CPUCAPACITY_FULL flag:
NUMA-2 0-3 0-3 0-3 0-3
groups: {0-1,3},{1-3} {0-2},{0,2-3} {1-3},{0-1,3} {0,2-3},{0-2}
NUMA-1 0-1,3 0-2 1-3 0,2-3
groups: {0},{1},{3} {0},{1},{2} {1},{2},{3} {0},{2},{3}
NUMA-0 0 1 2 3
The "sd->shared" assignments at NUMA-1 will put first, second, and the
last domain in the same "shared" range by today's logic since the first
CPU in their span is the same although their spans are slightly
different.
The third will be standalone since the first CPU of the domain span
will be different.
> If we think cross-NUMA scanning is undesirable, that's probably a more general
> issue in select_idle_capacity(), rather than something specific to this change
> and we can address this later.
Ack! That is a tangential problem but may require some looking at if
we decide to extend the sd->shared object to SD_NUMA domains. I guess
if anyone is running such setup, this bit will be the least of their
worries.
--
Thanks and Regards,
Prateek
next prev parent reply other threads:[~2026-04-20 9:39 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-03 5:31 [PATCH v2 0/2] sched/fair: SMT-aware asymmetric CPU capacity Andrea Righi
2026-04-03 5:31 ` [PATCH 1/2] sched/fair: Prefer fully-idle SMT cores in asym-capacity idle selection Andrea Righi
2026-04-07 11:21 ` Dietmar Eggemann
2026-04-18 8:24 ` Andrea Righi
2026-04-20 5:49 ` K Prateek Nayak
2026-04-20 8:36 ` Andrea Righi
2026-04-20 9:39 ` K Prateek Nayak [this message]
2026-04-20 21:42 ` Andrea Righi
2026-04-21 9:01 ` Andrea Righi
2026-04-21 9:35 ` Andrea Righi
2026-04-17 9:39 ` Vincent Guittot
2026-04-18 6:02 ` Andrea Righi
2026-04-19 10:20 ` Vincent Guittot
2026-04-03 5:31 ` [PATCH 2/2] sched/fair: Reject misfit pulls onto busy SMT siblings on asym-capacity Andrea Righi
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=1230f5df-470a-4e59-8c8e-fa159a6fc093@amd.com \
--to=kprateek.nayak@amd.com \
--cc=arighi@nvidia.com \
--cc=balbirs@nvidia.com \
--cc=bsegall@google.com \
--cc=christian.loehle@arm.com \
--cc=dietmar.eggemann@arm.com \
--cc=fabecassis@nvidia.com \
--cc=juri.lelli@redhat.com \
--cc=kobak@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=sshegde@linux.ibm.com \
--cc=vincent.guittot@linaro.org \
--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