summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-08-21 10:44:10 +0200
committermdb:android-git <superproject-auto-update@invalid>2024-01-10 12:50:23 +0000
commit2116a1e2c0be4aea097f366fe28e760f19fb0340 (patch)
treeb0fe977f5d0625b69583997aa533eca1ceb10698
parentadd287f4c1187a5f765912ef4ebe70716e649cd7 (diff)
downloadsuperproject-2116a1e2c0be4aea097f366fe28e760f19fb0340.tar.gz
UPSTREAM: cpuidle: menu: Retain tick when shallow state is selected
The case addressed by commit 5ef499cd571c (cpuidle: menu: Handle stopped tick more aggressively) in the stopped tick case is present when the tick has not been stopped yet too. Namely, if only two CPU idle states, shallow state A with target residency significantly below the tick boundary and deep state B with target residency significantly above it, are available and the predicted idle duration is above the tick boundary, but below the target residency of state B, state A will be selected and the CPU may spend indefinite amount of time in it, which is not quite energy-efficient. However, if the tick has not been stopped yet and the governor is about to select a shallow idle state for the CPU even though the idle duration predicted by it is above the tick boundary, it should be fine to wake up the CPU early, so the tick can be retained then and the governor will have a chance to select a deeper state when it runs next time. [Note that when this really happens, it will make the idle duration predictor believe that the CPU might be idle longer than predicted, which will make it more likely to predict longer idle durations going forward, but that will also cause deeper idle states to be selected going forward, on average, which is what's needed here.] Bug: 254441685 Fixes: 87c9fe6ee495 (cpuidle: menu: Avoid selecting shallow states with stopped tick) Reported-by: Leo Yan <leo.yan@linaro.org> Cc: 4.17+ <stable@vger.kernel.org> # 4.17+: 5ef499cd571c (cpuidle: menu: Handle ...) Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> (cherry picked from commit 757ab15c3f4968b5a29caf3fe8b67660ce84c3cd) Signed-off-by: Lee Jones <joneslee@google.com> Change-Id: Ie337749f46f9f21f26e25acf87006ee463da78cf
m---------common0
1 files changed, 0 insertions, 0 deletions
diff --git a/common b/common
-Subproject 0a203f3e16e6bedbb4bc54fc38813cd016c04d8
+Subproject 48fa89bc73388370a88abcdf3c61b352a3457f8