Re: [PATCH 1/4] sched/fair: Prefer fully-idle SMT cores in asym-capacity idle selection
From: Andrea Righi
Date: Fri Mar 27 2026 - 07:04:43 EST
Hi Prateek,
On Fri, Mar 27, 2026 at 04:14:57PM +0530, K Prateek Nayak wrote:
> Hello Andrea,
>
> On 3/26/2026 8:32 PM, Andrea Righi wrote:
> > /* This CPU fits with all requirements */
> > - if (fits > 0)
> > - return cpu;
> > + if (fits > 0) {
> > + if (prefer_idle_cores && on_idle_core)
> > + return cpu;
> > + if (!prefer_idle_cores)
> > + return cpu;
>
> nit.
>
> Can the above two be re-wittern as:
>
> if (!prefer_idle_cores || on_idle_core)
> return cpu;
>
> since they are equivalent.
Oh yes, indeed.
Thanks,
-Andrea