From: Shrikanth Hegde <sshegde@linux.ibm.com>
To: Chen Yu <yu.c.chen@intel.com>
Cc: maddy@linux.ibm.com, linuxppc-dev@lists.ozlabs.org,
peterz@infradead.org, tim.c.chen@linux.intel.com,
christophe.leroy@csgroup.eu, linux-kernel@vger.kernel.org,
ritesh.list@gmail.com, kprateek.nayak@amd.com,
vineethr@linux.ibm.com, vincent.guittot@linaro.org,
srikar@linux.ibm.com, npiggin@gmail.com, mpe@ellerman.id.au
Subject: Re: [PATCH v2 1/4] powerpc/topology: Introduce llc_override kernel parameter
Date: Tue, 10 Nov 2026 22:58:55 +0530 [thread overview]
Message-ID: <77f21080-06cc-46ed-a125-d9859792ff3a@linux.ibm.com> (raw)
In-Reply-To: <atuAaE4Y-_2CLA37@chenyu-dev>
Hi Chen Yu, Thanks for taking a look.
On 10/23/26 9:12 PM, Chen Yu wrote:
> Hi Shrikanth,
>
> On Fri, Oct 23, 2026 at 06:46:43PM +0530, Shrikanth Hegde wrote:
>
> [ ... ]
>
>> ---
>> arch/powerpc/kernel/smp.c | 23 +++++++++++++++++++++++
>> 1 file changed, 23 insertions(+)
>>
>> diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
>> index 6a5a5469aaae..6b1201ea3572 100644
>> --- a/arch/powerpc/kernel/smp.c
>> +++ b/arch/powerpc/kernel/smp.c
>> @@ -1059,6 +1059,29 @@ static bool has_coregroup_support(void)
>> return coregroup_enabled;
>> }
>>
>> +enum llc_override_values {
>> + LLC_OVERRIDE_MC = 1,
>> + LLC_OVERRIDE_PKG = 2,
>> +};
>> +
>> +static int llc_override;
>> +
>> +static int __init set_llc_override(char *str)
>> +{
>> + if (!strcasecmp(str, "mc") && has_coregroup_support())
>> + WRITE_ONCE(llc_override, LLC_OVERRIDE_MC);
>
> There is only 1 booting CPU at the moment, maybe WRITE_ONCE() is not needed.
Yes.
>
>> + else if (!strcasecmp(str, "pkg"))
>> + WRITE_ONCE(llc_override, LLC_OVERRIDE_PKG);
>> + else {
>> + pr_warn("Unsupported llc_override=%s\n", str);
>> + return 1;
>> + }
>> +
>> + pr_info("llc_override set at domain: %s\n", str);
>> + return 1;
>> +}
>> +__setup("llc_override=", set_llc_override);
>> +
>> static int __init init_big_cores(void)
>> {
>> int cpu;
>
> On PowerPC, it seems that get_effective_llc_bytes() always returns 0,
> which makes exceed_llc_capacity() return true, so cache-aware scheduling
> is disabled on PowerPC. We might need to provide an arch_llc_bytes() that
> is adjusted based on llc_override - sometimes calculate the sum of L2 across
> several cores.
>
> thanks,
> Chenyu
Ah!. I hadn't checked that. Thanks for pointing out.
I am thinking right path would be to move powerpc cacheinfo into a generic one.
I see there was an effort a while ago. Need to look into how to pull it off
if it is possible.
We could think of arch_llc_bytes if above is not possible.
next prev parent reply other threads:[~2026-11-10 17:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-23 13:16 [PATCH v2 0/4] " Shrikanth Hegde
2026-10-23 13:16 ` [PATCH v2 1/4] " Shrikanth Hegde
2026-10-23 15:42 ` Chen Yu
2026-11-10 17:28 ` Shrikanth Hegde [this message]
2026-10-23 13:16 ` [PATCH v2 2/4] powerpc/topology: Update mc/pkg flags based on llc_override Shrikanth Hegde
2026-10-23 13:16 ` [PATCH v2 3/4] powerpc/topology: Update arch_llc_mask based llc_override Shrikanth Hegde
2026-10-23 13:16 ` [PATCH v2 4/4] Documentation/powerpc: Add details about llc_override Shrikanth Hegde
2026-10-23 17:58 ` [PATCH v2 0/4] powerpc/topology: Introduce llc_override kernel parameter Tim Chen
2026-11-10 17:35 ` Shrikanth Hegde
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=77f21080-06cc-46ed-a125-d9859792ff3a@linux.ibm.com \
--to=sshegde@linux.ibm.com \
--cc=christophe.leroy@csgroup.eu \
--cc=kprateek.nayak@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
--cc=peterz@infradead.org \
--cc=ritesh.list@gmail.com \
--cc=srikar@linux.ibm.com \
--cc=tim.c.chen@linux.intel.com \
--cc=vincent.guittot@linaro.org \
--cc=vineethr@linux.ibm.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®