sched: walt: Optimize cpu_util() and cpu_util_cum()
The task demand in 1024 units is readily available in task_struct, so
use it directly for cumulative_runnable_avg and cum_window_demand
accounting. The cpu_util() and cpu_util_cum() functions which are
called multiple times during the task placement can return the
scaled values without doing any math.
Scaling the sum of unscaled demand of tasks is more accurate compared
to the sum of scaled demand of tasks, but it is good enough for
task placement decisions.
Change-Id: Iba4be93cd34f130bed1cb533ecaa52ab8bae5f3d
Signed-off-by:
Pavankumar Kondeti <pkondeti@codeaurora.org>
Loading
Please register or sign in to comment