lkml.org 
[lkml]   [2021]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 1/2][v2] cpufreq: intel_pstate: Add parameter to get guarantee frequency
On Mon, Jan 11, 2021 at 8:40 AM Chen Yu <yu.c.chen@intel.com> wrote:
>
> Add input parameter to receive guarantee pstate from intel_pstate_get_hwp_max()
> for later use.

I'm not a fan of this change, because the new argument will only be
needed in one place where intel_pstate_get_hwp_max() and it requires
adding redundant local vars and pointless updates elsewhere.

Besides, in intel_pstate_get_cpu_pstates() you can do something like
this after calling intel_pstate_get_hwp_max():

cpu->pstate.max_pstate = HWP_GUARANTEED_PERF(READ_ONCE(cpu->hwp_cap_cached));
cpu->pstate.max_freq = cpu->pstate.max_pstate * cpu->pstate.scaling;

\
 
 \ /
  Last update: 2021-01-11 13:46    [W:0.112 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site