sched: fair: Account PELT estimated utilization on WALT disabled cpu_util_cum

This improves scheduler decision accuracy, on load balancing and EAS placement
specifically

Change-Id: I21733de68d9796e2c69605102e0fb5ea60e742b5
Signed-off-by: Diep Quynh <remilia.1505@gmail.com>
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
fourteen
Diep Quynh 4 years ago committed by Jenna
parent 4b365e2430
commit 9c208ca1ef
  1. 10
      kernel/sched/sched.h

@ -2054,7 +2054,7 @@ static inline unsigned long __cpu_util(int cpu)
unsigned int util; unsigned int util;
#ifdef CONFIG_SCHED_WALT #ifdef CONFIG_SCHED_WALT
if (likely(!walt_disabled && sysctl_sched_use_walt_cpu_util)) { if (!walt_disabled && sysctl_sched_use_walt_cpu_util) {
u64 walt_cpu_util = u64 walt_cpu_util =
cpu_rq(cpu)->walt_stats.cumulative_runnable_avg_scaled; cpu_rq(cpu)->walt_stats.cumulative_runnable_avg_scaled;
@ -2081,13 +2081,15 @@ struct sched_walt_cpu_load {
static inline unsigned long cpu_util_cum(int cpu, int delta) static inline unsigned long cpu_util_cum(int cpu, int delta)
{ {
u64 util = cpu_rq(cpu)->cfs.avg.util_avg;
unsigned long capacity = capacity_orig_of(cpu); unsigned long capacity = capacity_orig_of(cpu);
u64 util;
#ifdef CONFIG_SCHED_WALT #ifdef CONFIG_SCHED_WALT
if (!walt_disabled && sysctl_sched_use_walt_cpu_util) util = cpu_util(cpu);
util = cpu_rq(cpu)->cum_window_demand_scaled; #else
util = __cpu_util(cpu);
#endif #endif
delta += util; delta += util;
if (delta < 0) if (delta < 0)
return 0; return 0;

Loading…
Cancel
Save