From: Borislav Petkov <bp@suse.de>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Stratos Karafotis <stratosk@semaphore.gr>,
Viresh Kumar <viresh.kumar@linaro.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
linux-pm@vger.kernel.org, cpufreq@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/3] cpufreq: ondemand: Change the calculation of target frequency
Date: Sun, 9 Jun 2013 18:26:53 +0200 [thread overview]
Message-ID: <20130609162653.GA5004@pd.tnic> (raw)
In-Reply-To: <2892497.M93vsSKx5I@vostro.rjw.lan>
On Sun, Jun 09, 2013 at 12:18:09AM +0200, Rafael J. Wysocki wrote:
> The average power drawn by the package is slightly higher with the
> patchset applied (27.66 W vs 27.25 W), but since the time needed to
> complete the workload with the patchset applied was shorter by about
> 2.3 sec, the total energy used was less in the latter case (by about
> 25.7 J if I'm not mistaken, or 1% relative). This means that in the
> absence of a power limit between 27.25 W and 27.66 W it's better to
> use the kernel with the patchset applied for that particular workload
> from the performance and energy usage perspective.
>
> Good, hopefully that's going to be confirmed on other systems and/or
> with other workloads. :-)
Yep, I see similar results on my AMD F15h.
So there's a register which tells you what the current energy
consumption in Watts is and support for it is integrated in lm_sensors.
I did one read per second, for the duration of the kernel build (10-r5 +
tip), with and without the patch, and averaged out the results:
without
=======
1. 158 samples, avg Watts: 116.915
2. 158 samples, avg Watts: 116.855
3. 158 samples, avg Watts: 116.737
4. 158 samples, avg Watts: 116.792
=> 116.82475 avg Watts.
with
====
1. 157 samples, avg Watts: 116.496
2. 156 samples, avg Watts: 117.535
3. 156 samples, avg Watts: 118.174
4. 157 samples, avg Watts: 117.95
=> 117.53875 avg Watts.
So there's a slight raise in the average power consumption but the
samples count drops by 1 or 2, which is consistent with the observed
kernel build speedup of 1 or 2 seconds.
perf doesn't show any significant difference with and without the patch
but those are single runs only.
without
=======
Performance counter stats for 'make -j9':
1167856.647713 task-clock # 7.272 CPUs utilized
1,071,177 context-switches # 0.917 K/sec
52,844 cpu-migrations # 0.045 K/sec
43,600,721 page-faults # 0.037 M/sec
4,712,068,048,465 cycles # 4.035 GHz
1,181,730,064,794 stalled-cycles-frontend # 25.08% frontend cycles idle
243,576,229,438 stalled-cycles-backend # 5.17% backend cycles idle
2,966,369,010,209 instructions # 0.63 insns per cycle
# 0.40 stalled cycles per insn
651,136,706,156 branches # 557.548 M/sec
34,582,447,788 branch-misses # 5.31% of all branches
160.599796045 seconds time elapsed
with
====
Performance counter stats for 'make -j9':
1169278.095561 task-clock # 7.271 CPUs utilized
1,076,528 context-switches # 0.921 K/sec
53,284 cpu-migrations # 0.046 K/sec
43,598,610 page-faults # 0.037 M/sec
4,721,747,687,668 cycles # 4.038 GHz
1,182,301,583,422 stalled-cycles-frontend # 25.04% frontend cycles idle
248,675,448,161 stalled-cycles-backend # 5.27% backend cycles idle
2,967,419,684,598 instructions # 0.63 insns per cycle
# 0.40 stalled cycles per insn
651,527,448,140 branches # 557.205 M/sec
34,560,656,638 branch-misses # 5.30% of all branches
160.811815170 seconds time elapsed
--
Regards/Gruss,
Boris.
Sent from a fat crate under my desk. Formatting is fine.
--
next prev parent reply other threads:[~2013-06-09 16:26 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-08 12:34 [PATCH v3 1/3] cpufreq: ondemand: Change the calculation of target frequency Stratos Karafotis
2013-06-08 14:05 ` Rafael J. Wysocki
2013-06-08 20:31 ` Stratos Karafotis
2013-06-08 22:18 ` Rafael J. Wysocki
2013-06-09 16:26 ` Borislav Petkov [this message]
2013-06-09 18:08 ` Stratos Karafotis
2013-06-09 20:58 ` Rafael J. Wysocki
2013-06-09 21:14 ` Borislav Petkov
2013-06-09 22:11 ` Rafael J. Wysocki
2013-06-10 21:57 ` Stratos Karafotis
2013-06-10 23:24 ` Rafael J. Wysocki
2013-06-13 21:22 ` Stratos Karafotis
2013-06-13 21:40 ` Borislav Petkov
2013-06-13 22:04 ` Stratos Karafotis
2013-06-13 22:38 ` Borislav Petkov
2013-06-13 22:15 ` Rafael J. Wysocki
2013-06-13 22:37 ` Borislav Petkov
2013-06-14 12:46 ` Rafael J. Wysocki
2013-06-14 12:44 ` Borislav Petkov
2013-06-14 12:55 ` Rafael J. Wysocki
2013-06-14 15:53 ` Stratos Karafotis
-- strict thread matches above, loose matches on Subject: below --
2013-06-06 12:56 Stratos Karafotis
2013-06-06 12:54 Stratos Karafotis
2013-06-06 13:15 ` Borislav Petkov
2013-06-05 16:01 Stratos Karafotis
2013-06-05 16:17 ` Borislav Petkov
2013-06-05 16:58 ` David C Niemi
2013-06-06 9:55 ` Borislav Petkov
2013-06-06 9:57 ` Viresh Kumar
2013-06-06 13:50 ` David C Niemi
2013-06-05 17:13 ` Stratos Karafotis
2013-06-05 20:35 ` Rafael J. Wysocki
2013-06-06 10:01 ` Borislav Petkov
2013-06-06 10:10 ` Viresh Kumar
2013-06-06 12:10 ` Borislav Petkov
2013-06-06 16:46 ` Stratos Karafotis
2013-06-06 17:11 ` Borislav Petkov
2013-06-06 17:32 ` Stratos Karafotis
2013-06-07 19:14 ` Stratos Karafotis
2013-06-07 20:57 ` Rafael J. Wysocki
2013-06-08 9:56 ` Stratos Karafotis
2013-06-08 11:18 ` Rafael J. Wysocki
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=20130609162653.GA5004@pd.tnic \
--to=bp@suse.de \
--cc=cpufreq@vger.kernel.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rjw@sisk.pl \
--cc=stratosk@semaphore.gr \
--cc=tglx@linutronix.de \
--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