]> git.ipfire.org Git - thirdparty/linux.git/commit
cpuidle: governors: teo: Avoid selecting states with zero-size bins
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 14 Jan 2026 19:44:04 +0000 (20:44 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 23 Jan 2026 20:49:54 +0000 (21:49 +0100)
commit4bd2221f231d798b01027367857d9ba2f24f6ea0
tree23b09523132dcd70112f5cebdbab776f3d3d9e04
parent80606f4eb8d7484ab7f7d6f0fd30d71e6fbcf328
cpuidle: governors: teo: Avoid selecting states with zero-size bins

If the last two enabled idle states have the same target residency which
is at least equal to TICK_NSEC, teo may select the next-to-last one even
though the size of that state's bin is 0, which is confusing.

Prevent that from happening by adding a target residency check to the
relevant code path.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Christian Loehle <christian.loehle@arm.com>
[ rjw: Fixed a typo in the changelog ]
Link: https://patch.msgid.link/3033265.e9J7NaK4W3@rafael.j.wysocki
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpuidle/governors/teo.c