Re: [PATCH 1/2] sched/fair: Prefer fully-idle SMT cores in asym-capacity idle selection
From: K Prateek Nayak
Date: Tue Apr 21 2026 - 23:37:06 EST
Hello Andrea,
On 4/21/2026 7:08 PM, Andrea Righi wrote:
>> You can also try "best_fits <= -3" in that last bailout condition and
>> see if that help.
>
> For the bailout condition I don't see much difference using either <= -3 or
> == -4. In general, I see a small but consistent improvement with the SIS_UTIL
> logic, especially when the system is close to saturation (as expected).
Thank you for testing! I guess == -4 is safer then.
It is probably best to add an enum of sorts to help distinguish these
states rather than the magic numbers. Perhaps something like:
enum asym_fits_state {
/* In descending order of preference */
ASYM_IDLE_CORE_UCLAMP_MISFIT = -4,
ASYM_IDLE_CORE_COMPLETE_MISFIT,
ASYM_IDLE_THREAD_FITS,
ASYM_IDLE_THREAD_UCLAMP_MISFIT,
ASYM_IDLE_COMPLETE_MISFIT,
/* asym_fits_cpu() bias for an idle core. */
ASYM_IDLE_CORE_BIAS = -3,
};
>
> So, this looks good to me! Do you want me to include also this one in the new
> SMT-aware asym cpu capacity patch series (keeping your authorship of course) or
> do you prefer to route this separately?
I think you can send it as a part of your series for easy review. I'll
be happy to help reworking those bits based on the comments if folks
aren't happy with them ;-)
--
Thanks and Regards,
Prateek