From: "Doug Smythies" <dsmythies@telus.net>
To: 'plongepe' <philippe.longepe@linux.intel.com>
Cc: linux-pm@vger.kernel.org,
'Srinivas Pandruvada' <srinivas.pandruvada@linux.intel.com>,
"'Rafael J. Wysocki'" <rjw@rjwysocki.net>,
'Stephane Gasparini' <stephane.gasparini@linux.intel.com>
Subject: RE: [PATCH v1 1/2] intel_pstate: Use the cpu load to determine the PercentPerformance
Date: Mon, 23 Nov 2015 17:33:39 -0800 [thread overview]
Message-ID: <001c01d12658$266277e0$732767a0$@net> (raw)
In-Reply-To: <5653149B.5090100@linux.intel.com>
On 2015.11.23 05:29 plongepe wrote:
> On 21/11/2015 17:21, Doug Smythies wrote:
>> On 2015.11.06 17:14 Srinivas Pandruvada wrote:
>> On Sat, 2015-11-07 at 02:09 +0100, Rafael J. Wysocki wrote:
>>> On Tuesday, November 03, 2015 10:27:19 AM Philippe Longepe wrote:
>>>> Aperf and Mperf counter are not enough to determine the Target P
>>>> -state
>>>> because they measure performance only when the targeted processor
>>>> is
>>>> in the C0 state (active state).
>>>> Because of that, we were computing the average P-state during the
>>>> last
>>>> period which can be very different from the average frequency
>>>> (or percentage of performance).
>>>>
>>>> As defined in the SDM (section 14.2), the PercentPerformance is
>>>> defined by:
>>>>
>>>> PercentPerformance = PercentBusy * (delta_aperf / delta_mperf);
>>>>
>>>> The PercentBusy (or load) can be estimated as the ratio of the
>>>> mperf
>>>> counter running at a constant frequency only during active periods
>>>> (C0)
>>>> and the time stamp counter running at the same frequency but also
>>>> during idle.
>>>>
>>>> So, PercentBusy = 100 * (delta_mperf / delta_tsc)
>>>>
>>>> and, PercentPerformance = 100 * (delta_mperf / delta_tsc) *
>>>> (delta_aperf / delta_mperf)
>>>> That can be simplified with:
>>>> PercentPerformance = 100 * (delta_aperf / delta_tsc)
>>
>> Yes, but the last time I tried to bring back actual load calculations
>> In a similar way it was pointed out that one should not do it this way.
>> [1] SDM also states:
>>
>> "Only the IA32_APERF/IA32_MPERF ratio is architecturally defined;
>> software should not attach meaning to the content of the individual of IA32_APERF or IA32_MPERF MSRs."
>
> Individual counters are not architecturally defined but their ratio is
> defined.
> MERF and TSC counters are both counting at the same frequency (max non
> turbo freq)
> but MPERF is counting only in active state (C0) and TSC is counting all
> the time.
> So, delta_mperf/delta_tsc is representing the load.
I agree.
However, Intel should decide once and for all if mperf / tsc is allowed or not.
It was used one time, then it was deleted, then I tried to bring it back,
then I was told it wasn't allowed, now you are trying to bring it back.
... Doug
next prev parent reply other threads:[~2015-11-24 1:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-03 9:27 [PATCH v1 1/2] intel_pstate: Use the cpu load to determine the PercentPerformance Philippe Longepe
2015-11-03 9:27 ` [PATCH v1 2/2] intel_pstate: Change the setpoint for the cores Philippe Longepe
2015-11-21 16:22 ` Doug Smythies
2015-11-23 13:45 ` Philippe Longepe
2015-11-07 1:09 ` [PATCH v1 1/2] intel_pstate: Use the cpu load to determine the PercentPerformance Rafael J. Wysocki
2015-11-07 1:14 ` Srinivas Pandruvada
2015-11-21 16:21 ` Doug Smythies
2015-11-23 13:28 ` plongepe
2015-11-24 1:33 ` Doug Smythies [this message]
2015-11-24 1:44 ` Srinivas Pandruvada
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='001c01d12658$266277e0$732767a0$@net' \
--to=dsmythies@telus.net \
--cc=linux-pm@vger.kernel.org \
--cc=philippe.longepe@linux.intel.com \
--cc=rjw@rjwysocki.net \
--cc=srinivas.pandruvada@linux.intel.com \
--cc=stephane.gasparini@linux.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;
as well as URLs for NNTP newsgroup(s).