kernel: sched: fix cpu cpu_capacity_orig being capped incorrectly

update_cpu_capacity will update cpu_capacity_orig capped with
thermal_cap, in non-WALT case, thermal_cap is previous
cpu_capacity_orig. This caused cpu_capacity_orig being capped
incorrectly.

Test: Build
Bug: 144143594
Change-Id: I1ff9d9c87554c2d2395d46b215276b7ab50585c0
Signed-off-by: Wei Wang <wvw@google.com>
(cherry picked from commit dac65a5a494f8d0c80101acc5d482d94cda6f158)
Signed-off-by: Danny Lin <danny@kdrag0n.dev>
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
fourteen
Wei Wang 5 years ago committed by Jenna
parent 5431d53c4a
commit 96a105f3a6
  1. 2
      kernel/sched/sched.h

@ -3112,7 +3112,7 @@ static inline void update_cpu_cluster_capacity(const cpumask_t *cpus) { }
#ifdef CONFIG_SMP
static inline unsigned long thermal_cap(int cpu)
{
return cpu_rq(cpu)->cpu_capacity_orig;
return SCHED_CAPACITY_SCALE;
}
#endif

Loading…
Cancel
Save