mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Chen, Yu C" <yu.c.chen@intel.com>
To: Mario Limonciello <mario.limonciello@amd.com>,
	Klaus Kusche <klaus.kusche@computerix.info>
Cc: "Badole, Vishal" <Vishal.Badole@amd.com>,
	<tim.c.chen@linux.intel.com>,
	Peter Zijlstra <peterz@infradead.org>,
	<linux-kernel@vger.kernel.org>,
	"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)"
	<x86@kernel.org>, <platform-driver-x86@vger.kernel.org>,
	K Prateek Nayak <KPrateek.Nayak@amd.com>,
	<ricardo.neri@intel.com>
Subject: Re: Cache-aware scheduling does not work well with amd big/little cores
Date: Mon, 31 Aug 2026 10:08:39 +0800	[thread overview]
Message-ID: <b475039b-defe-46e7-ab85-46e3196da667@intel.com> (raw)
In-Reply-To: <8064e1d8-b51c-48e5-a312-8c31581991f5@amd.com>

Hi,

On 8/31/2026 9:53 AM, Mario Limonciello wrote:
> Add a few others who have worked on CAS.
> 
> On 8/29/26 10:42, Klaus Kusche wrote:
>>
>> Hello,
>>
>> I'm running linux on an AMD Ryzen HX 370.
>> I use Gentoo and compile a lot of things (including the kernel)
>> with Clang using full LTO, which results in a single LTO process
>> running for minutes on an otherwise idle processor.
>>
>> Before Cache-aware scheduling was introduced,
>> AMD's pstate driver informed the scheduler about big and little cores,
>> and the scheduler always moved those LTO processes to a big/fast core.
>>
>> Now, the cache-aware scheduling takes precedence over big/little
>> scheduling: All big cores form one L3 cache domain,
>> and all little cores form the other L3 cache domain.
>>
>> When a process is started on a little core (and LTO is in most cases),
>> it will no longer be moved to a big core,
>> even if it runs for minutes and all big cores are idle.
>>
>> In case of LTO this hurts twice and badly
>> (slows down LTO not just noticeably, but dramatically:
>> In total, any compilation with LTO-linking takes much longer
>> compared to earlier kernels without cache-aware scheduling):
>>
>> * The little cores run slower (3.3 GHz instead of 5.1 GHz).
>>
>> * LTO linking is very cache intensive,
>> and the L3 cache of the little cores is only half the size (8 MB)
>> of the L3 cache of the big cores (16 MB).
>>
>>
>> So if a big core is idling, and a process on a little core
>> is long-running, big/little scheduling should overrule
>> cache-aware scheduling and move that process to a big core,
>> even if this moves the process to another cache domain.
>>
>> Greetings
>>
> 
> Not so sure if it would help this case but I will note there is a 
> debugfs knob you might be able to use called aggr_tolerance (it was 
> introduced in c1e7fe5e75ed11fa85368e5a186472afd3858f3a if you want to 
> read more about it's background).

Thanks Mario and Kusche for bringing this issue up. Yes, we can tune Cache
Aware scheduling via debugfs or even turn it off. The issue in current code
is that the cache aware scheduling overwrites the strategy of asymmetric 
scheduling,
and Ricardo also found this issue previous and there is a patch to address
that, by honoring CPU capacity during cache aware scheduling, for the 
**misfit**
task. It would be helpful to see if this patch makes things better:
https://lore.kernel.org/lkml/20260825174112.2580942-1-tim.c.chen@linux.intel.com/

thanks,
Chenyu

  reply	other threads:[~2026-08-31  2:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-29 15:42 Klaus Kusche
2026-08-31  1:53 ` Mario Limonciello
2026-08-31  2:08   ` Chen, Yu C [this message]
2026-08-31 11:24     ` Klaus Kusche
2026-08-31 17:29       ` Tim Chen
2026-08-31 18:49         ` Klaus Kusche
2026-08-31 18:53           ` Mario Limonciello
2026-09-05 15:40         ` Klaus Kusche

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=b475039b-defe-46e7-ab85-46e3196da667@intel.com \
    --to=yu.c.chen@intel.com \
    --cc=KPrateek.Nayak@amd.com \
    --cc=Vishal.Badole@amd.com \
    --cc=klaus.kusche@computerix.info \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mario.limonciello@amd.com \
    --cc=peterz@infradead.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=ricardo.neri@intel.com \
    --cc=tim.c.chen@linux.intel.com \
    --cc=x86@kernel.org \
    /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®