[dpdk-dev] [PATCH v4 2/2] power: do not skip saving original pstate governor

Burakov, Anatoly anatoly.burakov at intel.com
Fri Apr 2 11:34:07 CEST 2021


On 02-Apr-21 10:26 AM, Anatoly Burakov wrote:
> Currently, when we set the pstate governor to "performance", we check if
> it is already set to this value, and if it is, we skip setting it.
> 
> However, we never save this value anywhere, so that next time we come
> back and request the governor to be set to its original value, the
> original value is empty.
> 
> Fix it by saving the original pstate governor first. While we're at it,
> replace `strlcpy` with `rte_strscpy`.
> 
> Fixes: e6c6dc0f96c8 ("power: add p-state driver compatibility")
> Cc: david.hunt at intel.com
> 
> Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>
> ---
>   lib/librte_power/power_pstate_cpufreq.c | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/librte_power/power_pstate_cpufreq.c b/lib/librte_power/power_pstate_cpufreq.c
> index c4639e4b8a..1cb0e4d917 100644
> --- a/lib/librte_power/power_pstate_cpufreq.c
> +++ b/lib/librte_power/power_pstate_cpufreq.c

Apologies for wrong threading, i'm sending patches from a new machine so 
it's been a while since i've run git commands manually...

-- 
Thanks,
Anatoly


More information about the dev mailing list