From: Chen Yu <yu.c.chen@intel.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
Len Brown <lenb@kernel.org>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Viresh Kumar <viresh.kumar@linaro.org>,
Linux PM <linux-pm@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Zhang Rui <rui.zhang@intel.com>,
Wendy Wang <wendy.wang@intel.com>
Subject: Re: [PATCH 1/2][v2] cpufreq: intel_pstate: Add parameter to get guarantee frequency
Date: Tue, 12 Jan 2021 11:29:02 +0800 [thread overview]
Message-ID: <20210112032902.GB28619@chenyu-office.sh.intel.com> (raw)
In-Reply-To: <CAJZ5v0i5F3kFOxzAax1RS9etrLtzLBuPRoqvbQM=NwuonFZDVw@mail.gmail.com>
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@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;
Okay, will do in next version.
Thanks,
Chenyu
next prev parent reply other threads:[~2021-01-12 3:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-11 7:43 [PATCH 0/2][v2] Get percpu max freq via HWP MSR register Chen Yu
2021-01-11 7:43 ` [PATCH 1/2][v2] cpufreq: intel_pstate: Add parameter to get guarantee frequency Chen Yu
2021-01-11 12:44 ` Rafael J. Wysocki
2021-01-12 3:29 ` Chen Yu [this message]
2021-01-11 7:43 ` [PATCH 2/2][v2] cpufreq: intel_pstate: Get percpu max freq via HWP MSR register if available Chen Yu
2021-01-11 11:11 ` Srinivas Pandruvada
2021-01-12 3:28 ` Chen Yu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210112032902.GB28619@chenyu-office.sh.intel.com \
--to=yu.c.chen@intel.com \
--cc=lenb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=rjw@rjwysocki.net \
--cc=rui.zhang@intel.com \
--cc=srinivas.pandruvada@linux.intel.com \
--cc=viresh.kumar@linaro.org \
--cc=wendy.wang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®