Re: [PATCH 12/19] sched/fair: Add migrate_llc_task migration type for cache-aware balancing

From: K Prateek Nayak

Date: Mon Oct 27 2025 - 05:13:25 EST


Hello Tim,

On 10/11/2025 11:54 PM, Tim Chen wrote:
> @@ -12149,6 +12167,16 @@ static struct rq *sched_balance_find_src_rq(struct lb_env *env,
> }
> break;
>
> + case migrate_llc_task:
> +#ifdef CONFIG_SCHED_CACHE
> + dst_llc = llc_idx(env->dst_cpu);
> + if (!cpus_share_cache(env->dst_cpu, rq->cpu) &&

Busiest group is always a non-local group right? Can cpus_share_cache()
ever happen given we are looking at groups of first !SD_LLC_SHARE
domain for "migrate_llc_task"?

> + busiest_pref_llc < rq->nr_pref_llc[dst_llc]) {
> + busiest_pref_llc = rq->nr_pref_llc[dst_llc];
> + busiest = rq;
> + }
> +#endif
> + break;
> case migrate_task:
> if (busiest_nr < nr_running) {
> busiest_nr = nr_running;

--
Thanks and Regards,
Prateek