From: Kayra Cizmeci <kayracizmeci@gmail.com>
To: tim.c.chen@linux.intel.com
Cc: KPrateek.Nayak@amd.com, Vishal.Badole@amd.com,
justinstitt@google.com, kayracizmeci@gmail.com,
klaus.kusche@computerix.info, linux-kernel@vger.kernel.org,
llvm@lists.linux.dev, mario.limonciello@amd.com,
mingo@redhat.com, morbo@google.com, nathan@kernel.org,
ndesaulniers@google.com, peterz@infradead.org,
platform-driver-x86@vger.kernel.org, ricardo.neri@intel.com,
stable@vger.kernel.org, x86@kernel.org, yu.c.chen@intel.com
Subject: Re: [PATCH] sched/cache: Honor asym packing over cache aware scheduling on hybrid system
Date: Tue, 29 Sep 2026 21:21:37 +0300 [thread overview]
Message-ID: <20260929182137.196669-1-kayracizmeci@gmail.com> (raw)
In-Reply-To: <d7cd3f7d528dff79d2a702543e7d97a44c0c078b.camel@linux.intel.com>
Hi Tim :>,
> > Let's say when entering can_migrate_llc_task(), dst_cpu is CPU0, while src_cpu is CPU1.
> > And CPU0 has a bigger asym_prio than CPU1. No SMT. When entering can_migrate_llc_task() and sched_asym()
> > from there sched_use_asym_prio() returns true without checking if the core is fully idle or not.
> sched_asym() does check whether the destination core is idle in sched_use_asym_prio() for non SMT domain.
>
> (false for non-SMT sd) (check idle core)
> return sd->flags & SD_SHARE_CPUCAPACITY || is_core_idle(cpu);
>
> That is also a pre-condition for setting group_asym_packing.
Sorry for not showing the code earlier, here it is:
static inline bool is_core_idle(int cpu)
{
int sibling;
for_each_cpu(sibling, cpu_smt_mask(cpu)) {
if (cpu == sibling)
continue;
if (!idle_cpu(sibling))
return false;
}
return true;
}
static bool sched_use_asym_prio(struct sched_domain *sd, int cpu)
{
if (!(sd->flags & SD_ASYM_PACKING))
return false;
if (!sched_smt_active())
return true;
return sd->flags & SD_SHARE_CPUCAPACITY || is_core_idle(cpu);
}
On sched_use_asym_prio(), before the idle check a CPU without SMT returns true.
But I'm actually wrong on that one because on that one we're laying
on the idle protection outside to the CPU. If there are not any
other brothers, and I'm idle then my brother-family
is idle... Ah I messed up describing this.
But is there are any idle protection outside? I couldn't
find any. I could be missing something tho.
> > And sched_asym_prefer() comes back true too, so sched_asym() returns true and, we just returned mig_unrestricted.
> >
> > I could be missing something, If I'm not tho is that on purpose? If it is, the last paragraph needs to change
> > since it says that "asym packing tries to migrate task to an empty core" and after that "higher performing idle core"
> I think I did try to point out the idle core aspect in my commit log:
> "When asym packing tries to migrate task to an empty
> core that has higher priority than source cpu, let asym packing win.
> Moving tasks to a higher performing idle core will buy more
> performance than cache co-location."
I know. I was trying to say that if we're not choosing an idle
core this needs to change.
Thanks,
Kayra
next prev parent reply other threads:[~2026-09-29 18:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-28 18:37 Tim Chen
2026-09-28 19:52 ` Kayra Cizmeci
2026-09-29 17:51 ` Tim Chen
2026-09-29 18:21 ` Kayra Cizmeci [this message]
2026-09-29 20:08 ` Tim Chen
2026-09-30 5:13 ` Kayra Cizmeci
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=20260929182137.196669-1-kayracizmeci@gmail.com \
--to=kayracizmeci@gmail.com \
--cc=KPrateek.Nayak@amd.com \
--cc=Vishal.Badole@amd.com \
--cc=justinstitt@google.com \
--cc=klaus.kusche@computerix.info \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=mario.limonciello@amd.com \
--cc=mingo@redhat.com \
--cc=morbo@google.com \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=peterz@infradead.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=ricardo.neri@intel.com \
--cc=stable@vger.kernel.org \
--cc=tim.c.chen@linux.intel.com \
--cc=x86@kernel.org \
--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®