[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210112032902.GB28619@chenyu-office.sh.intel.com>
Date: Tue, 12 Jan 2021 11:29:02 +0800
From: Chen Yu <yu.c.chen@...el.com>
To: "Rafael J. Wysocki" <rafael@...nel.org>
Cc: Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
Len Brown <lenb@...nel.org>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Viresh Kumar <viresh.kumar@...aro.org>,
Linux PM <linux-pm@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Zhang Rui <rui.zhang@...el.com>,
Wendy Wang <wendy.wang@...el.com>
Subject: Re: [PATCH 1/2][v2] cpufreq: intel_pstate: Add parameter to get
guarantee frequency
On Mon, Jan 11, 2021 at 01:44:09PM +0100, Rafael J. Wysocki wrote:
> On Mon, Jan 11, 2021 at 8:40 AM Chen Yu <yu.c.chen@...el.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;
Okay, will do in next version.
Thanks,
Chenyu
Powered by blists - more mailing lists