cpuidle: menu: Compute first_idx when latency_req is known
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 2 Oct 2018 21:42:56 +0000 (23:42 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 4 Oct 2018 17:24:14 +0000 (19:24 +0200)
commit23e8ceb9ce766c81d62434053aef6e7efea6fcc3
tree0d7d20b5ba6677db8076fd92f839a098d5c77752
parent5f26bdceb9c0a5e6c696aa2899d077cd3ae93413
cpuidle: menu: Compute first_idx when latency_req is known

Since menu_select() can only set first_idx to 1 if the exit latency
of the second state is not greater than the latency limit, it should
first determine that limit.  Thus first_idx should be computed after
the "interactivity" factor has been taken into account.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewedy-by: Daniel Lezcano <daniel.lezcano@linaro.org>
drivers/cpuidle/governors/menu.c