From: Heiko Carstens <hca@linux.ibm.com>
To: Mete Durlu <meted@linux.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>,
Alexander Gordeev <agordeev@linux.ibm.com>,
Christian Borntraeger <borntraeger@linux.ibm.com>,
Sven Schnelle <svens@linux.ibm.com>,
linux-s390@vger.kernel.org
Subject: Re: [PATCH] s390/topology: Enable ASYM_PACKING to establish cpu priority
Date: Tue, 1 Sep 2026 17:30:38 +0200 [thread overview]
Message-ID: <20260901153038.152550B9b-hca@linux.ibm.com> (raw)
In-Reply-To: <20260901-s390_sd_flags-v1-1-6755ba191d5a@linux.ibm.com>
On Tue, Sep 01, 2026 at 04:40:26PM +0200, Mete Durlu wrote:
> On s390 LPARs the hypervisor assigns varying CPU runtime capacities
> under vertical polarization, making CPUs unequal. Add SD_ASYM_PACKING
> into topology level flag callbacks so the scheduler keeps busier
> scheduling groups packed onto higher-capacity CPUs.
> Implement arch_asym_cpu_priority() using smp_cpu_get_capacity() as
> the decision factor.
...
> Subtract the CPU number so that the CPUs with lower ids are prioritized.
Why?
> Only enabled on LPAR level as other guest levels either do not have
> vertical polarization (which causes asymmetric CPUs), or machine backed
> topology.
...
> +static int s390_core_flags(void)
> +{
> + int flags = cpu_core_flags();
> +
> + if (machine_is_lpar())
> + flags |= SD_ASYM_PACKING;
> + return flags;
> +}
Why is this machine_is_lpar()? This should actually test if cpu
polarization is available to make this independent of some random
environment test.
Furthermore to me this reads like the above only makes sense in case of
vertical polarization. What happens in case of horizontal polarization?
Does SD_ASYM_PACKING have any negative impact for that case?
> +int arch_asym_cpu_priority(int cpu)
> +{
> + return smp_cpu_get_capacity(cpu) - cpu;
> +}
As commented above. The rationale for this needs to documented.
Does this make sense for horizontal polarization?
next prev parent reply other threads:[~2026-09-01 15:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-01 14:40 [PATCH] s390/topology: Enable ASYM_PACKING to establish cpu priority Mete Durlu
2026-09-01 14:52 ` sashiko-bot
2026-09-01 15:30 ` Heiko Carstens [this message]
2026-09-03 11:46 ` Mete Durlu
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=20260901153038.152550B9b-hca@linux.ibm.com \
--to=hca@linux.ibm.com \
--cc=agordeev@linux.ibm.com \
--cc=borntraeger@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=linux-s390@vger.kernel.org \
--cc=meted@linux.ibm.com \
--cc=svens@linux.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.