From 3789d05a044ad03f00aecd17bc20d5b1c8db97dd Mon Sep 17 00:00:00 2001 From: Pavankumar Kondeti Date: Wed, 17 Feb 2021 15:00:40 +0530 Subject: [PATCH] sched/walt: Fix !idle case in walt_get_idle_exit_latency When a CPU is not in idle state, the idle exit latency should be 0. However walt_get_idle_exit_latency() returns UINT_MAX. Fix this. Without this, the idle CPU that is serving an interrupt will not win the battle against a CPU that is in a deep c-state. Change-Id: Ic9ca36add5cd97cc7174c8e25b269ae40aadd451 Signed-off-by: Pavankumar Kondeti --- kernel/sched/walt/walt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/walt/walt.h b/kernel/sched/walt/walt.h index 8360b39ba3b9..934e3fadbba2 100644 --- a/kernel/sched/walt/walt.h +++ b/kernel/sched/walt/walt.h @@ -731,7 +731,7 @@ static inline unsigned int walt_get_idle_exit_latency(struct rq *rq) if (idle) return idle->exit_latency; - return UINT_MAX; + return 0; /* CPU is not idle */ } extern void sched_get_nr_running_avg(struct sched_avg_stats *stats);