Skip to content

cpuidle: Avoid returning a disabled C-state from menu governor

Rafael J. Wysocki linux-pm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 8 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2cpuidle: Combine cpuidle_enabled() with cpuidle_select()drivers/cpuidle/cpuidle.c include/linux/cpuidle.h kernel/sched/idle.c+13 -380 replies
2/2cpuidle / menu: Return error code if there are no suitable statesdrivers/cpuidle/governors/menu.c include/linux/cpuidle.h+3 -18 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] cpuidle: Avoid returning a disabled C-state from menu governor

Hi,

The cpuidle menu governor has a problem that it returns 0 when it can't find a suitable C-state, but on some systems in some situations 0 may be the CPUIDLE_DRIVER_STATE_START index and it shouldn't be returned if the corresponding C-state has been disabled, for example.

The following two patches avoid this issue by modifying the menu governor to return an error code rather than 0 in those situations.

[1/2] Combine cpuidle_enabled() with cpuidle_select(), because [2/2] makes
the latter return negative error codes sometimes, so keeping them separate is not useful any more.

[2/2] Modify the menu governor to return an error code if the extra "poll" state
is not available.

Thanks!

Signature · 2 lines
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.