Re: [PATCH v2 05/23] sched/cache: Assign preferred LLC ID to processes
From: Chen, Yu C
Date: Wed Jan 07 2026 - 03:38:52 EST
On 1/7/2026 12:49 PM, Jianyong Wu wrote:
Hi Tim,
On 12/4/2025 7:07 AM, Tim Chen wrote:
+
+ if (mm->mm_sched_cpu != -1) {
+ mm_sched_llc = llc_id(mm->mm_sched_cpu);
+
+#ifdef CONFIG_NUMA_BALANCING
+ /*
+ * Don't assign preferred LLC if it
+ * conflicts with NUMA balancing.
+ */
+ if (p->numa_preferred_nid >= 0 &&
+ cpu_to_node(mm->mm_sched_cpu) != p->numa_preferred_nid)
+ mm_sched_llc = -1;
Scenario: NUMA balancing is initially enabled and numa_preferred_nid is set. After disabling NUMA balancing, numa_preferred_nid is not cleared, leading to unintended impact of NUMA balancing on cache-aware scheduling. Should we check if NUMA balancing is disabled before checking numa_preferred_nid?
Good point, sched_numa_balancing should be checked here.
thanks,
Chenyu
Thanks
Jianyong Wu