Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit efd4327c authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "sched/fair: fix cpu util for waking tasks"

parents f3a5f8f1 30900a8b
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -6951,7 +6951,8 @@ static int cpu_util_wake(int cpu, struct task_struct *p)
	 * utilization from cpu utilization. Instead just use
	 * cpu_util for this case.
	 */
	if (!walt_disabled && sysctl_sched_use_walt_cpu_util)
	if (!walt_disabled && sysctl_sched_use_walt_cpu_util &&
					p->state == TASK_WAKING)
		return cpu_util(cpu);
#endif
	/* Task has no contribution or is new */
@@ -6959,7 +6960,7 @@ static int cpu_util_wake(int cpu, struct task_struct *p)
		return cpu_util(cpu);

	capacity = capacity_orig_of(cpu);
	util = max_t(long, cpu_rq(cpu)->cfs.avg.util_avg - task_util(p), 0);
	util = max_t(long, cpu_util(cpu) - task_util(p), 0);

	return (util >= capacity) ? capacity : util;
}