Re: [PATCH 19/19] sched/fair: Add user control to adjust the tolerance of cache-aware scheduling

From: Aaron Lu

Date: Wed Oct 29 2025 - 04:07:07 EST


On Sat, Oct 11, 2025 at 11:24:56AM -0700, Tim Chen wrote:
... ...
> +static inline int get_sched_cache_cap_scale(void)
> +{
> + return (llc_overload_pct / cpu_smt_num_threads);
> +}
> +
... ...
> @@ -9749,7 +9811,7 @@ static inline int task_is_ineligible_on_dst_cpu(struct task_struct *p, int dest_
> * (default: ~50%)
> */
> #define fits_llc_capacity(util, max) \
> - ((util) * 100 < (max) * llc_overload_pct)
> + ((util) * 100 < (max) * get_sched_cache_cap_scale())
>

With this change, fits_llc_capacity() would be false if util is just 1/4
of max(which is llc's total cpu capacity), is this intended?