linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/2] sched/fair: Fix asym_fits_capacity() task_util type
@ 2021-11-18 14:14 Vincent Donnefort
  2021-11-18 14:14 ` [PATCH v2 2/2] sched/fair: Fix task_fits_capacity() capacity type Vincent Donnefort
  2021-12-06 15:20 ` [PATCH v2 1/2] sched/fair: Fix asym_fits_capacity() task_util type Peter Zijlstra
  0 siblings, 2 replies; 5+ messages in thread
From: Vincent Donnefort @ 2021-11-18 14:14 UTC (permalink / raw)
  To: peterz, mingo, vincent.guittot
  Cc: linux-kernel, dietmar.eggemann, valentin.schneider, Vincent Donnefort

task_util is an unsigned long value, compared with a CPU capacity which is
unsigned long as well. There's no need for an intermediate implicit int
cast.

Fixes: b4c9c9f15649 ("sched/fair: Prefer prev cpu in asymmetric wakeup path")
Signed-off-by: Vincent Donnefort <vincent.donnefort@arm.com>
Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org>

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 945d987246c5..8fde6e10e24b 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -6346,7 +6346,7 @@ select_idle_capacity(struct task_struct *p, struct sched_domain *sd, int target)
 	return best_cpu;
 }
 
-static inline bool asym_fits_capacity(int task_util, int cpu)
+static inline bool asym_fits_capacity(unsigned long task_util, int cpu)
 {
 	if (static_branch_unlikely(&sched_asym_cpucapacity))
 		return fits_capacity(task_util, capacity_of(cpu));
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-12-07  9:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-18 14:14 [PATCH v2 1/2] sched/fair: Fix asym_fits_capacity() task_util type Vincent Donnefort
2021-11-18 14:14 ` [PATCH v2 2/2] sched/fair: Fix task_fits_capacity() capacity type Vincent Donnefort
2021-11-23  8:38   ` Vincent Guittot
2021-12-06 15:20 ` [PATCH v2 1/2] sched/fair: Fix asym_fits_capacity() task_util type Peter Zijlstra
2021-12-07  9:48   ` Vincent Donnefort

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).