linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Pandruvada, Srinivas" <srinivas.pandruvada@intel.com>
To: "ahs3@redhat.com" <ahs3@redhat.com>,
	"ashwinch@google.com" <ashwinch@google.com>
Cc: "pprakash@codeaurora.org" <pprakash@codeaurora.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"viresh.kumar@linaro.org" <viresh.kumar@linaro.org>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	"rjw@rjwysocki.net" <rjw@rjwysocki.net>
Subject: Re: [PATCH v5] Force cppc_cpufreq to report values in KHz to fix user space reporting
Date: Thu, 25 Aug 2016 22:00:41 +0000	[thread overview]
Message-ID: <1472162436.13076.21.camel@intel.com> (raw)
In-Reply-To: <8012e614-885a-0445-44aa-63d92de5cd1f@redhat.com>

On Tue, 2016-08-23 at 10:14 -0600, Al Stone wrote:
> > > 

[...]

> > In x86 when CPPC is used, the unit is really unit-less in CPPC
> > tables.
> > This means that cpu->perf_caps.highest_perf can be just 0xff,
> > instead
> > of some scaled cppc max performance corresponding to max MHZ the
> > processor can support. This allows the processor to cap at max
> > which it
> > can deliver.
> > Is this case not possible for ARM SoCs?
> > 
[...]
> If I understand the question properly, I don't think it matters, and
> I don't
> think that will work for x86 either.
> 
> This patch is meant to allow CPPC to continue operating solely based
> on the
> abstract scale provided by the ACPI tables; this should be true
> regardless
> of architecture.  Any actual processor performance changes are still
> guided
> solely by the CPPC scale provided in the tables, and not the values
> in the
> cpu->perf_caps struct.
> 
> Assuming I understand the kernel code, the values in cpu->perf_caps
> -- in this
> case -- are really just for reporting to user space via sysfs, which
> is the
> root of the problem: user space expects frequencies, and we have none
> when using
> CPPC so we have to provide an approximation.  In those circumstances,
> I think a
> value of 0xff would be kind of confusing in sysfs, since it's
> basically saying
> the CPU is operating at a frequency equal to the largest integer
> value.
> 
> To be fair, this is how the ARM processor implements CPPC; I have not
> examined
> in detail the newly submitted x86 patches to use CPPC so I cannot
> comment on
> those.  This patch was written well before those showed up.
Currently we are not using cppc-cpufreq driver, so not will not
directly impact (you are  not changing acpi-cpufreq source, which we
are using).
x86 has other way to get max/min cpufreq policy frequencies using MSRs.
So you may choose to ignore my comments here, as long as your changes
are limited to drivers/cpufreq/cppc_cpufreq.c

When you are doing:
policy->min = cpu->perf_caps.lowest_perf * cppc_dmi_max_khz / cpu-
>perf_caps.highest_perf;

Aren't you assuming that scale from max to min performance is only
related to frequency? It is possible that many points in between can be
same frequency with multiple voltages.
As per spec " The platform may choose to use a single metric such as
processor frequency, or it may choose to blend multiple hardware
metrics to create a synthetic measure of performance".

Thanks,
Srinivas 


> 

  reply	other threads:[~2016-08-25 22:05 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-20 21:10 [PATCH v5] Force cppc_cpufreq to report values in KHz to fix user space reporting Al Stone
2016-08-01 20:07 ` Al Stone
2016-08-01 20:31 ` Viresh Kumar
2016-08-11 18:15   ` Al Stone
2016-08-22 17:16     ` Al Stone
2016-08-22 17:45       ` Ashwin Chaugule
2016-08-22 18:12         ` Al Stone
2016-08-23  4:31           ` Pandruvada, Srinivas
2016-08-23 16:14             ` Al Stone
2016-08-25 22:00               ` Pandruvada, Srinivas [this message]
2016-08-30 17:09                 ` Al Stone
2016-09-14  1:09 ` Rafael J. Wysocki
2016-09-19 18:53   ` Al Stone

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=1472162436.13076.21.camel@intel.com \
    --to=srinivas.pandruvada@intel.com \
    --cc=ahs3@redhat.com \
    --cc=ashwinch@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=pprakash@codeaurora.org \
    --cc=rjw@rjwysocki.net \
    --cc=viresh.kumar@linaro.org \
    /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;
as well as URLs for NNTP newsgroup(s).