]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
cpuidle: Allow exit latency to exceed target residency
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 17 Jun 2026 16:16:16 +0000 (18:16 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 23 Jun 2026 12:00:29 +0000 (14:00 +0200)
Commit 76934e495cdc ("cpuidle: Add sanity check for exit latency and
target residency") had added a check to prevent the exit latency of an
idle state from exceeding its target residency that later was limited to
printing a warning message in that case in commit 4bf944f3fcb6 ("cpuidle:
Warn instead of bailing out if target residency check fails").

However, a thorough code inspection with that in mind leads to the
conclusion that actually there are no assumptions in cpuidle regarding
the relationship between the exit latency and target residency of a
given idle state.  It is generally assumed that the idle states table
provided by a cpuidle driver will be sorted by both the target residency
and exit latency in ascending order, but that's a different matter.

Accordingly, drop the check in question along with the message printed
when it triggers and the inaccurate comment preceding it.

Fixes: 4bf944f3fcb6 ("cpuidle: Warn instead of bailing out if target residency check fails")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Christian Loehle <christian.loehle@arm.com>
[ rjw: Subject fixup ]
Link: https://patch.msgid.link/3444162.aeNJFYEL58@rafael.j.wysocki
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpuidle/driver.c

index 370664c47e6593f02b37eda18e464e8c6054d82a..e355b42043cf26af3018e0a24d41b79447647537 100644 (file)
@@ -195,14 +195,6 @@ static void __cpuidle_driver_init(struct cpuidle_driver *drv)
                        s->exit_latency_ns =  0;
                else
                        s->exit_latency = div_u64(s->exit_latency_ns, NSEC_PER_USEC);
-
-               /*
-                * Warn if the exit latency of a CPU idle state exceeds its
-                * target residency which is assumed to never happen in cpuidle
-                * in multiple places.
-                */
-               if (s->exit_latency_ns > s->target_residency_ns)
-                       pr_warn("Idle state %d target residency too low\n", i);
        }
 }