Commit 736cc6b3 authored by Vincent Donnefort's avatar Vincent Donnefort Committed by Ingo Molnar

sched/fair: use lsub_positive in cpu_util_next()

The sub_positive local version is saving an explicit load-store and is
enough for the cpu_util_next() usage.
Signed-off-by: default avatarVincent Donnefort <vincent.donnefort@arm.com>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
Reviewed-by: default avatarQuentin Perret <qperret@google.com>
Reviewed-by: default avatarDietmar Eggemann <dietmar.eggemann@arm.com>
Link: https://lkml.kernel.org/r/20210225083612.1113823-3-vincent.donnefort@arm.com
parent 0372e1cf
...@@ -6471,7 +6471,7 @@ static unsigned long cpu_util_next(int cpu, struct task_struct *p, int dst_cpu) ...@@ -6471,7 +6471,7 @@ static unsigned long cpu_util_next(int cpu, struct task_struct *p, int dst_cpu)
* util_avg should already be correct. * util_avg should already be correct.
*/ */
if (task_cpu(p) == cpu && dst_cpu != cpu) if (task_cpu(p) == cpu && dst_cpu != cpu)
sub_positive(&util, task_util(p)); lsub_positive(&util, task_util(p));
else if (task_cpu(p) != cpu && dst_cpu == cpu) else if (task_cpu(p) != cpu && dst_cpu == cpu)
util += task_util(p); util += task_util(p);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment