Portion of the fixes were ported to 6.1 but 3 were missed. This ports the remainder of the fixes. Based on 6.1.24. a2e90611b9f4 ("sched/fair: Remove capacity inversion detection") is not necessary to backport because it has a dependency on e5ed0550c04c ("sched/fair: unlink misfit task from cpu overutilized") which is nice to have but not strictly required. It improves the search for best CPU under adverse thermal pressure to try harder. And the new search effectively replaces the capacity inversion detection, so it is removed afterwards. Build tested on (cross compile when necessary; x86_64 otherwise): 1. default ubuntu config which has uclamp + smp 2. default ubuntu config without uclamp + smp 3. default ubunto config without smp (which automatically disables uclamp) 4. reported riscv-allnoconfig, mips-randconfig, x86_64-randocnfigs Boot tested on x86 qemu environment only. Qais Yousef (3): sched/fair: Detect capacity inversion sched/fair: Consider capacity inversion in util_fits_cpu() sched/fair: Fixes for capacity inversion detection kernel/sched/fair.c | 86 +++++++++++++++++++++++++++++++++++++++----- kernel/sched/sched.h | 19 ++++++++++ 2 files changed, 97 insertions(+), 8 deletions(-) -- 2.25.1