Re: [PATCH v3 03/21] sched/cache: Introduce helper functions to enforce LLC migration policy

From: Peter Zijlstra

Date: Thu Feb 19 2026 - 06:30:56 EST


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?

Anyway, let me read on..