Re: [PATCH RESEND v3 3/6] rtla/utils: Add idle state disabling via libcpupower

From: Tomas Glozar
Date: Fri Oct 11 2024 - 06:46:59 EST


čt 10. 10. 2024 v 22:06 odesílatel Steven Rostedt <rostedt@xxxxxxxxxxx> napsal:
>
> If nr_states is zero, this returns 0 without ever allocating
> saved_cpu_idle_disable_state.
>
>> ...
>
> This returns -1 even if nr_states is zero. That is,
> save_cpu_idle_disable_state() can return success, but this restore will
> return failure.
>
> -- Steve

Oh I see: there might be no idle states to save,
saved_cpu_idle_disable_state doesn't get allocated at all, and then
restore_cpu_idle_disable_state behaves as the saves weren't saved
before. Checking for nr_state should fix that; I'll send a v3.

Tomas