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.

> +     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

Reply via email to