From: Mete Durlu <meted@linux.ibm.com>
To: Tim Chen <tim.c.chen@linux.intel.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>,
Shrikanth Hegde <sshegde@linux.ibm.com>,
Heiko Carstens <hca@linux.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>,
Alexander Gordeev <agordeev@linux.ibm.com>,
Christian Borntraeger <borntraeger@linux.ibm.com>,
Sven Schnelle <svens@linux.ibm.com>
Cc: Chen Yu <yu.c.chen@intel.com>,
Ilya Leoshkevich <iii@linux.ibm.com>,
Andrea Righi <arighi@nvidia.com>,
linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org
Subject: Re: [PATCH RFC 0/2] sched: Introduce idle SMT priority for asymmetric capacity systems
Date: Mon, 12 Oct 2026 12:41:23 +0200 [thread overview]
Message-ID: <9d813d35-2962-4981-9fc4-fc59d5e64865@linux.ibm.com> (raw)
In-Reply-To: <76e09124223f7adb7f486fd861ead3bdbf595016.camel@linux.intel.com>
[..snip..]
>>
>> Considerations and Open Questions
>> ===========================================================================
>> The main goal for this series is adding a simple mechanism for
>> architectures to switch between idle core and idle SMT priority while
>> keeping the introduced footprint as small as possible. But there are
>> some ideas and questions to consider;
>>
>> 1. Should arch_needs_idle_smt_prio() hook be removed?
>
> Hi Mete,
>
> One assumption in the series should be made explicit, and I think
> it answers your question 1.
>
> The idea only works if two CPUs that the guest sees as SMT siblings
> really run on the same physical core. "An idle sibling of a busy
> high-capacity core" is cheaper than a fully idle low-capacity core
> only because it uses a physical core the partition already has. That
> holds on an LPAR, where hypervisor dispatches whole cores.
True, the whole idea is based on this assumption and it is not
mentioned. I'll add this.
> It does not
> hold in general for a guest whose hypervisor schedules vCPUs one at a
> time, such as a typical KVM guest with "threads=2". There the guest's
> sibling masks are just a description, and packing onto "siblings"
> gives no benefit.
Right, if the whole topology is virtual, the vCPUs are just
separate independent entities from each other. I am not sure
if there is a way to configure a KVM guest to reflect this
and make the KVM hypervisor to schedule whole guest cores.
Regardless, I agree that this has to be explicitly stated
somewhere, probably in Kconfig's help text.
> Nothing in the series checks this, and it is not documented:
>
> - In patch 1, the default arch_needs_idle_smt_prio() returns true,
> and the Kconfig help does not mention that siblings must share a
> physical core. Any arch that selects
> ARCH_SUPPORTS_SCHED_IDLE_SMT_PRIO takes this on without being told.
>
> - In patch 2, the hook checks only the topology mode:
>
>> +bool arch_needs_idle_smt_prio(void)
>> +{
>> + if (topology_mode != TOPOLOGY_MODE_HW)
>> + return false;
>> + return true;
>> +}
>
> Today s390 seems to be safe because sibling masks are
> only built in HW mode. It is the only place where this
> precondition can be enforced.
>
> So I would keep the hook. It is the only place where this
> precondition can be enforced. Removing it and tying the feature to
> "Kconfig + asymmetric capacities" would drop the check entirely.
> Concretely:
>
> 1) Document the contract in the Kconfig help and above the hook,
> for example: "Only select this if CPUs reported as SMT siblings
> are always dispatched on the same physical core."
Will do!
> 2) Make the s390 hook test the conditions from the cover letter,
> something like:
>
> return machine_is_lpar() &&
> topology_mode == TOPOLOGY_MODE_HW &&
> smp_cpu_mtid;
Makes sense, as this won't help on systems with SMT disabled.
Thanks for the comments!
-Mete
prev parent reply other threads:[~2026-10-12 10:41 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-08 8:30 Mete Durlu
2026-10-08 8:30 ` [PATCH RFC 1/2] kernel/sched: Introduce idle SMT priority Mete Durlu
2026-10-08 8:30 ` [PATCH RFC 2/2] s390/topology: Enable SCHED_IDLE_SMT_PRIO Mete Durlu
2026-10-08 12:10 ` [PATCH RFC 0/2] sched: Introduce idle SMT priority for asymmetric capacity systems Andrea Righi
2026-10-08 14:58 ` Shrikanth Hegde
2026-10-08 15:24 ` Mete Durlu
2026-10-08 15:44 ` Shrikanth Hegde
2026-10-09 15:12 ` Andrea Righi
2026-10-09 15:35 ` Shrikanth Hegde
2026-10-12 12:32 ` Mete Durlu
2026-10-12 13:49 ` Shrikanth Hegde
2026-10-13 10:24 ` Mete Durlu
2026-10-09 15:32 ` Vincent Guittot
2026-10-12 11:04 ` Mete Durlu
2026-10-12 14:49 ` Vincent Guittot
2026-10-13 10:50 ` Mete Durlu
2026-10-13 11:19 ` Shrikanth Hegde
2026-10-13 12:40 ` Mete Durlu
2026-10-14 5:05 ` Shrikanth Hegde
2026-10-15 12:02 ` Vincent Guittot
2026-10-20 9:13 ` Mete Durlu
2026-10-29 12:25 ` Shrikanth Hegde
2026-10-08 21:52 ` Tim Chen
2026-10-08 21:29 ` Tim Chen
2026-10-12 10:41 ` Mete Durlu [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=9d813d35-2962-4981-9fc4-fc59d5e64865@linux.ibm.com \
--to=meted@linux.ibm.com \
--cc=agordeev@linux.ibm.com \
--cc=arighi@nvidia.com \
--cc=borntraeger@linux.ibm.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=iii@linux.ibm.com \
--cc=juri.lelli@redhat.com \
--cc=kprateek.nayak@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@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=svens@linux.ibm.com \
--cc=tim.c.chen@linux.intel.com \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
--cc=yu.c.chen@intel.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®