]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
cpuidle: governors: teo: Decay metrics below DECAY_SHIFT threshold
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 12 Nov 2025 18:03:08 +0000 (19:03 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 14 Nov 2025 14:20:01 +0000 (15:20 +0100)
commitb54df61c7428ff50b21a03a53e3d580c6e84d1bf
treee4c026aa2697536c86c51d4d6ee9f404a895a259
parent8f3f01082d7ab334706c7d96c9271cd99e68aabc
cpuidle: governors: teo: Decay metrics below DECAY_SHIFT threshold

If a given governor metric falls below a certain value (8 for
DECAY_SHIFT equal to 3), it will not decay any more due to the
simplistic decay implementation.  This may in some cases lead to
subtle inconsistencies in the governor behavior, so change the
decay implementation to take it into account and set the metric
at hand to 0 in that case.

Suggested-by: Christian Loehle <christian.loehle@arm.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Christian Loehle <christian.loehle@arm.com>
Tested-by: Christian Loehle <christian.loehle@arm.com>
Link: https://patch.msgid.link/2819353.mvXUDI8C0e@rafael.j.wysocki
drivers/cpuidle/governors/teo.c