From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
Linux PM list <linux-pm@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/3] intel_pstate: Clarify average performance computation
Date: Tue, 10 May 2016 12:58:04 -0700 [thread overview]
Message-ID: <1462910284.28729.116.camel@linux.intel.com> (raw)
In-Reply-To: <CAJZ5v0h3Z9Dr72KdXzCiv-5Yb6kjv-Bpt0weacQ2jO0gU96hEQ@mail.gmail.com>
On Tue, 2016-05-10 at 21:21 +0200, Rafael J. Wysocki wrote:
> On Tue, May 10, 2016 at 3:18 AM, Srinivas Pandruvada
> <srinivas.pandruvada@linux.intel.com> wrote:
> >
> > On Sat, 2016-05-07 at 01:44 +0200, Rafael J. Wysocki wrote:
> > >
> > > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> > >
> > > The core_pct_busy field of struct sample actually contains the
> > > average performace during the last sampling period (in percent)
> > > and not the utilization of the core as suggested by its name
> > > which is confusing.
> > >
> > > For this reason, change the name of that field to core_avg_perf
> > > and rename the function that computes its value accordingly.
> > >
> > Makes perfect sense.
> >
> > >
> > > Also notice that it would be more useful if it was a "raw"
> > > fraction
> > > rather than percentage, so change its meaning too and update the
> > > code using it accordingly (it is better to change the name of
> > > the field along with its meaning in one go than to make those
> > > two changes separately, as that would likely lead to more
> > > confusion).
> > Due to the calculation the results from old and new method will be
> > similar but not same. For example in one scenario the
> > get_avg_frequency difference is 4.3KHz (printed side by side using
> > both
> > old style using pct and new using fraction)
> > Frequency with old calc: 2996093 Hz
> I guess the above is the new one?
>
> >
> > Frequency with old calc: 3000460 Hz
> So the relative difference is of the order of 0.1% and that number is
> not what is used in PID computations. That's what is printed, but
> I'm
> not sure if that's really that important. :-)
This difference will appear in cpufreq sysfs as their granularity in
KHz for current frequency. But the difference is very small. So I guess
no one will notice.
Thanks,
Srinivas
>
> Here, the sample.aperf bits lost because the 100 was moved away from
> intel_pstate_calc_busy() would be multiplied by a relatively large
> number to produce the difference that looks significant, but the
> numbers actually used in computations are a few orders of magnitude
> smaller.
>
> >
> > How much do you think the performance gain changing fraction vs
> > pct?
> I'm more concerned about latency than about performance. On HWP, for
> example, the costly multiplication removed by this from the hot path
> is of the order of the half of the work done.
>
> That said, I can do something to retain the bits in question for as
> long as possible, although the patch will be slightly more
> complicated
> then. :-)
The
next prev parent reply other threads:[~2016-05-10 19:58 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-06 23:42 [PATCH 0/3] intel_pstate: Improvements related to the APERF/MPERF computation Rafael J. Wysocki
2016-05-06 23:44 ` [PATCH 1/3] intel_pstate: Clarify average performance computation Rafael J. Wysocki
2016-05-10 1:18 ` Srinivas Pandruvada
2016-05-10 19:21 ` Rafael J. Wysocki
2016-05-10 19:58 ` Srinivas Pandruvada [this message]
2016-05-10 20:57 ` Rafael J. Wysocki
2016-05-11 5:01 ` Srinivas Pandruvada
2016-05-11 13:46 ` Rafael J. Wysocki
2016-05-06 23:45 ` [PATCH 2/3] intel_pstate: Use sample.core_avg_perf in get_avg_pstate() Rafael J. Wysocki
2016-05-06 23:47 ` [PATCH 3/3] intel_pstate: Clean up get_target_pstate_use_performance() Rafael J. Wysocki
2016-05-10 1:24 ` Srinivas Pandruvada
2016-05-11 17:06 ` [PATCH v2, 0/3] intel_pstate: Improvements related to the APERF/MPERF computation Rafael J. Wysocki
2016-05-11 17:09 ` [PATCH v2, 1/3] intel_pstate: Clarify average performance computation Rafael J. Wysocki
2016-05-11 17:10 ` [PATCH v2, 2/3] intel_pstate: Use sample.core_avg_perf in get_avg_pstate() Rafael J. Wysocki
2016-05-11 17:11 ` [PATCH v2, 3/3] intel_pstate: Clean up get_target_pstate_use_performance() Rafael J. Wysocki
2016-05-13 0:34 ` [PATCH v2, 0/3] intel_pstate: Improvements related to the APERF/MPERF computation 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=1462910284.28729.116.camel@linux.intel.com \
--to=srinivas.pandruvada@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=rjw@rjwysocki.net \
/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).