Re: [PATCHv2] sched/fair: Skip SCHED_IDLE rq for SCHED_IDLE task

From: K Prateek Nayak

Date: Wed Feb 04 2026 - 02:55:26 EST


Hello Shubhang,

On 2/4/2026 7:38 AM, Shubhang Kaushik wrote:
>> @@ -12299,7 +12305,7 @@ static void sched_balance_domains(struct rq *rq, enum cpu_idle_type idle)
>>                  * state even if we migrated tasks. Update it.
>>                  */
>>                 idle = idle_cpu(cpu);
>> -                busy = !idle && !sched_idle_cpu(cpu);
>> +                busy = !idle && !sched_idle_rq(rq);
>
> Usually sched_idle_rqs were treated as not-busy in several balancing decisions to avoid yielding to background load. Does this change alter that interpretation at the domain balancing level ?

I don't think anything changes in the load-balancer path since we still
check for sched_idle_rq() here. Only the wakeup path will consider both
the waking task's policy and whether the CPU is completely idle vs
sched_idle_rq().

>
>>             }
>>             sd->last_balance = jiffies;
>>             interval = get_sd_balance_interval(sd, busy);
--
Thanks and Regards,
Prateek