Re: [PATCH v3 03/21] sched/cache: Introduce helper functions to enforce LLC migration policy
From: Chen, Yu C
Date: Thu Feb 19 2026 - 09:48:44 EST
Hi Peter,
On 2/19/2026 7:29 PM, Peter Zijlstra wrote:
On Tue, Feb 10, 2026 at 02:18:43PM -0800, Tim Chen wrote:
+/*
+ * The margin used when comparing utilization.
+ * is 'util1' noticeably greater than 'util2'
+ * Derived from capacity_greater().
+ * Bias is in perentage.
+ */
+/* Allows dst util to be bigger than src util by up to bias percent */
+#define util_greater(util1, util2) \
+ ((util1) * 100 > (util2) * 120)
+ * 20% is the utilization imbalance percentage to decide
+ * if the preferred LLC is busier than the non-preferred LLC.
+ * 20 is a little higher than the LLC domain's imbalance_pct
+ * 17. The hysteresis is used to avoid task bouncing between the
+ * preferred LLC and the non-preferred LLC.
So not saying this needs changing now, but consider that imbalance_pct
can be changed through debugfs. Do you want this 120 to be expressed in
terms of imbalance_pct rather than being hardcoded?
Got it, I will look into adding a margin to imbalance_pct for this
comparison. With this change, I assume we can remove the llc_imb_pct
debugfs entry in patch 19.
thanks,
Chenyu
Anyway, let me read on..