Re: [PATCH v5 09/24] sched/fair: Pull the load on preferred CPU

From: Peter Zijlstra

Date: Fri Jun 26 2026 - 06:00:59 EST


On Thu, Jun 25, 2026 at 06:16:33PM +0530, Shrikanth Hegde wrote:

> @@ -14375,6 +14379,10 @@ static int sched_balance_newidle(struct rq *this_rq, struct rq_flags *rf)
> if (!cpu_active(this_cpu))
> return 0;
>
> + /* Do not pull to a !preferred CPU just to push it out next */
> + if (!cpu_preferred(this_cpu))
> + return 0;
> +
> /*
> * This is OK, because current is on_cpu, which avoids it being picked
> * for load-balance and preemption/IRQs are still disabled avoiding

Why not just replace the cpu_active() check above?