From: Anup Chenthamarakshan <anupc@chromium.org>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Dirk Brandewie <dirk.j.brandewie@intel.com>,
Sameer Nanda <snanda@chromium.org>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] intel_pstate: track and export frequency residency stats via sysfs.
Date: Tue, 9 Sep 2014 16:31:41 -0700 [thread overview]
Message-ID: <20140909233141.GB28142@google.com> (raw)
In-Reply-To: <CAOh2x==oX4HN2NJ=bMUzyuL0K9KdrmV7HjRctX9dio7yw-4sbQ@mail.gmail.com>
On Tue, Sep 09, 2014 at 11:56:18AM +0530, Viresh Kumar wrote:
> On Tue, Sep 9, 2014 at 11:02 AM, Anup Chenthamarakshan
> <anupc@chromium.org> wrote:
> > I had initially tried reusing cpufreq_stats.c to export stats.
> > Calling cpufreq_stats_update() via the cpufreq notifier added
> > some amount of overhead while switching frequencies. Specifically,
> > looking up the index of the new frequency in freq_table_get_index()
> > is a linear search through all available frequencies (vs a single
> > subtraction with custom stats export). Also, the notifier mechanism
>
> I don't think just this linear search will make things so bad..
Linear search usually slows down transition to higher P-states because
it has to go through the full list (and the list is longer in intel_pstate
compared to acpi-cpufreq). But, yes, this is probably not a bottleneck.
>
> > itself added a level of indirection before calling stats_update.
>
> Probably some other notifier is registered which is taking considerable
> amount of time.. Try checking what all registered with cpufreq-core.
There was no other notifier which was listening to freq transitions events.
>
> > There is a 5X increase in time taken to complete intel_pstate_set_pstate
> > while using cpufreq_stats compared to having custom stats exported.
>
> Try calling cpufreq_stat_notifier_trans() directly instead of a notifier
> and lets see if this makes it any better.
Here's a comparison of time taken to run intel_pstate_set_pstate() using
different approaches:
average time for a transition
no stats 4.7us
intel_pstate-stats 5.7us
direct call to cpufreq_stat_notifier_trans 8.1us
cpufreq-notifier-event 10.6us
I was wrong about the 5x increase (got tripped by calls to
intel_pstate_set_pstate where no change in P-state actually happened)
next prev parent reply other threads:[~2014-09-09 23:31 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-09 0:10 [PATCH] intel_pstate: track and export frequency residency stats via sysfs Anup Chenthamarakshan
2014-09-09 5:03 ` Viresh Kumar
2014-09-09 5:32 ` Anup Chenthamarakshan
2014-09-09 6:26 ` Viresh Kumar
2014-09-09 23:31 ` Anup Chenthamarakshan [this message]
2014-09-10 6:49 ` Viresh Kumar
2014-09-09 15:15 ` Dirk Brandewie
2014-09-09 23:22 ` Anup Chenthamarakshan
2014-09-10 16:39 ` Dirk Brandewie
2014-09-10 22:15 ` Anup Chenthamarakshan
2014-09-10 22:49 ` Rafael J. Wysocki
2014-09-10 23:39 ` Anup Chenthamarakshan
2014-09-11 0:04 ` Rafael J. Wysocki
2014-09-11 1:04 ` Sameer Nanda
2014-09-11 15:37 ` Dirk Brandewie
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=20140909233141.GB28142@google.com \
--to=anupc@chromium.org \
--cc=dirk.j.brandewie@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=snanda@chromium.org \
--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).