Thread (7 messages) 7 messages, 3 authors, 16h ago

Re: [PATCH v2 1/4] powerpc/topology: Introduce llc_override kernel parameter

flat view

From: Chen Yu <yu.c.chen@intel.com>
Date: 2026-10-23 15:56:46
Also in: lkml

Hi Shrikanth,

On Fri, Oct 23, 2026 at 06:46:43PM +0530, Shrikanth Hegde wrote:

[ ... ]
quoted hunk ↗ jump to hunk
---
 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.
quoted hunk ↗ jump to hunk
+	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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help