The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: K Prateek Nayak <kprateek.nayak@amd.com>
To: Andrea Righi <arighi@nvidia.com>,
	James Buck <jbuck2005.linux@outlook.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Juri Lelli <juri.lelli@redhat.com>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Valentin Schneider <vschneid@redhat.com>,
	Usama Arif <usama.arif@linux.dev>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"regressions@lists.linux.dev" <regressions@lists.linux.dev>
Subject: Re: [REGRESSION] sched/fair: SIS_UTIL limit in select_idle_capacity() leaves busy tasks on little CPUs while big CPUs are idle
Date: Wed, 25 Nov 2026 08:23:10 +0530	[thread overview]
Message-ID: <ce38fb8b-94d7-48ba-93bb-3b72cfcb3e61@amd.com> (raw)
In-Reply-To: <awWOCejxtjP12xFX@gpd4>

Hello Andrea,

On 11/24/2026 6:45 PM, Andrea Righi wrote:
> Hi James,
> 
> On Tue, Nov 24, 2026 at 11:56:52AM +0000, James Buck wrote:
>> Hi,
>>
>> Since commit 61ea17a63719 ("sched/fair: Add SIS_UTIL support to select_idle_capacity()"), first in v7.2, CPU-bound multi-threaded work on my big.LITTLE arm64 board runs 12-19% slower than on v7.1 and earlier, because waking threads are placed on idle little CPUs while idle big CPUs are never looked at.
>>
>> Turning SIS_UTIL off at runtime restores the old speed. select_idle_capacity() and update_idle_cpu_scan() are unchanged in v7.4-rc4, so I expect mainline to behave the same.
> 
> A related regression from the same commit was reported by Usama here:
> https://lore.kernel.org/r/20261113153157.2495664-1-usama.arif@linux.dev/
> 
> On Grace, a zero SIS_UTIL budget skips the search despite suitable CPUs
> being idle. Your case shows that a nonzero budget can stop the scan
> before reaching an idle big CPU.
> 
> We've discussed a minimum scan budget and accounting for idle CPU
> availability, though a small minimum alone may not fix your case.

This had problems in the past when Chenyu was iterating on SIS_UTIL
where the search opportunity at higher utilization is actually very
low and cutting off search for !idle core was beneficial for SMT
systems.

Now, for systems without SMT, it has its benefits too but a system
without SMT should be equivalent to a SMT one where test_idle_core()
returns true always if an idle CPU is present.

So I'm wondering if {set,test}_idle_cores() can be extended !SMT
to act like a gating indicator to say if an idle core exists or
not much like how !get_rd_overloaded(this_rq->rd) serves as a
gate for newidle balance - it can be flipped to true when a CPU
goes idle or if load balancer sees an idle CPU. Thoughts?
 
> Given both reports, reverting the commit seems the safest thing to do
> for now. That would restore the previous asym search behavior and we can
> revisit a better consistent strategy to cover both sym and asym CPU
> selection later.
> 
> Prateek, Vincent, what do you think?

IMO it still makes sense for SMT systems since capacity on systems
with SMT only makes sense if the entire core is idle and then it is
just a best effort thing right?

set_idle_cores(), would flip the flag as soon as an idle core is
available and after that SIS_UTIL is bypassed. I don't think the
SIS_UTIL cut-off for non-SMT ASYM_CAPACITY systems makes that much
sense given misfit penalty is much higher.

-- 
Thanks and Regards,
Prateek


  reply	other threads:[~2026-11-25  2:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-24 11:56 [REGRESSION] sched/fair: SIS_UTIL limit in select_idle_capacity() leaves busy tasks on little CPUs while big CPUs are idle James Buck
2026-11-24 13:15 ` Andrea Righi
2026-11-25  2:53   ` K Prateek Nayak [this message]
2026-11-25  7:51     ` Vincent Guittot
2026-11-25 10:27       ` Chen Yu
2026-11-24 15:18 ` Vincent Guittot
2026-11-24 18:41   ` Christian Loehle

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=ce38fb8b-94d7-48ba-93bb-3b72cfcb3e61@amd.com \
    --to=kprateek.nayak@amd.com \
    --cc=arighi@nvidia.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=jbuck2005.linux@outlook.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=regressions@lists.linux.dev \
    --cc=usama.arif@linux.dev \
    --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