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 <pkondeti@codeaurora.org>
This commit is contained in:
Pavankumar Kondeti 2021-02-17 15:00:40 +05:30 committed by Rishabh Bhatnagar
parent 81647d6a84
commit 3789d05a04

View File

@ -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);