From: Julia Lawall <julia.lawall@inria.fr>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Julia Lawall <julia.lawall@inria.fr>,
Francisco Jerez <currojerez@riseup.net>,
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
Len Brown <lenb@kernel.org>,
Viresh Kumar <viresh.kumar@linaro.org>,
Linux PM <linux-pm@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>
Subject: Re: cpufreq: intel_pstate: map utilization into the pstate range
Date: Tue, 28 Dec 2021 18:46:25 +0100 (CET) [thread overview]
Message-ID: <alpine.DEB.2.22.394.2112281845180.24929@hadrien> (raw)
In-Reply-To: <CAJZ5v0i4xnesG=vfx7Y-wyeaGvjDeGcsaOVqhRLnV8YXk-m2gA@mail.gmail.com>
On Tue, 28 Dec 2021, Rafael J. Wysocki wrote:
> On Tue, Dec 28, 2021 at 5:58 PM Julia Lawall <julia.lawall@inria.fr> wrote:
> >
> > I looked a bit more into why pstate 20 is always using the least energy. I
> > have just one thread spinning for 10 seconds, I use a fixed value for the
> > pstate, and I measure the energy usage with turbostat.
>
> How exactly do you fix the pstate?
diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c
index e7af18857371..19440b15454c 100644
--- a/kernel/sched/cpufreq_schedutil.c
+++ b/kernel/sched/cpufreq_schedutil.c
@@ -400,7 +402,7 @@ static void sugov_update_single_perf(struct update_util_data *hook, u64 time,
sg_cpu->util = prev_util;
cpufreq_driver_adjust_perf(sg_cpu->cpu, map_util_perf(sg_cpu->bw_dl),
- map_util_perf(sg_cpu->util), sg_cpu->max);
+ sysctl_sched_fixedfreq, sg_cpu->max);
sg_cpu->sg_policy->last_freq_update_time = time;
}
------------------------------
sysctl_sched_fixedfreq is a variable that I added to sysfs.
>
> > I tried this on a
> > 2-socket Intel 6130 and a 4-socket Intel 6130. The experiment runs 40
> > times.
> >
> > There seem to be only two levels of CPU energy usage. On the 2-socket
> > machine the energy usage is around 600J up to pstate 20 and around 1000J
> > after that. On the 4-socket machine it is twice that.
>
> These are the package power numbers from turbostat, aren't they?
Yes.
julia
next prev parent reply other threads:[~2021-12-28 17:46 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-13 22:52 cpufreq: intel_pstate: map utilization into the pstate range Julia Lawall
2021-12-17 18:36 ` Rafael J. Wysocki
2021-12-17 19:32 ` Julia Lawall
2021-12-17 20:36 ` Francisco Jerez
[not found] ` <alpine.DEB.2.22.394.2112172258480.2968@hadrien>
2021-12-18 0:04 ` Francisco Jerez
2021-12-18 6:12 ` Julia Lawall
2021-12-18 10:19 ` Francisco Jerez
2021-12-18 11:07 ` Julia Lawall
2021-12-18 22:12 ` Francisco Jerez
2021-12-19 6:42 ` Julia Lawall
2021-12-19 14:19 ` Rafael J. Wysocki
2021-12-19 14:30 ` Rafael J. Wysocki
2021-12-19 22:10 ` Francisco Jerez
[not found] ` <alpine.DEB.2.22.394.2112192312520.3181@hadrien>
2021-12-19 23:31 ` Francisco Jerez
2021-12-21 17:04 ` Rafael J. Wysocki
2021-12-21 23:56 ` Francisco Jerez
2021-12-22 14:54 ` Rafael J. Wysocki
2021-12-24 11:08 ` Julia Lawall
2021-12-28 16:58 ` Julia Lawall
2021-12-28 17:40 ` Rafael J. Wysocki
2021-12-28 17:46 ` Julia Lawall [this message]
2021-12-28 18:06 ` Rafael J. Wysocki
2021-12-28 18:16 ` Julia Lawall
2021-12-29 9:13 ` Julia Lawall
2021-12-30 17:03 ` Rafael J. Wysocki
2021-12-30 17:54 ` Julia Lawall
2021-12-30 17:58 ` Rafael J. Wysocki
2021-12-30 18:20 ` Julia Lawall
2021-12-30 18:37 ` Rafael J. Wysocki
2021-12-30 18:44 ` Julia Lawall
2022-01-03 15:50 ` Rafael J. Wysocki
2022-01-03 16:41 ` Julia Lawall
2022-01-03 18:23 ` Julia Lawall
2022-01-03 19:58 ` Rafael J. Wysocki
2022-01-03 20:51 ` Julia Lawall
2022-01-04 14:09 ` Rafael J. Wysocki
2022-01-04 15:49 ` Julia Lawall
2022-01-04 19:22 ` Rafael J. Wysocki
2022-01-05 20:19 ` Julia Lawall
2022-01-05 23:46 ` Francisco Jerez
2022-01-06 19:49 ` Julia Lawall
2022-01-06 20:28 ` Srinivas Pandruvada
2022-01-06 20:43 ` Julia Lawall
2022-01-06 21:55 ` srinivas pandruvada
2022-01-06 21:58 ` Julia Lawall
2022-01-05 0:38 ` Francisco Jerez
2021-12-19 14:14 ` Rafael J. Wysocki
2021-12-19 17:03 ` Julia Lawall
2021-12-19 22:30 ` Francisco Jerez
2021-12-21 18:10 ` 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=alpine.DEB.2.22.394.2112281845180.24929@hadrien \
--to=julia.lawall@inria.fr \
--cc=currojerez@riseup.net \
--cc=juri.lelli@redhat.com \
--cc=lenb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rafael@kernel.org \
--cc=srinivas.pandruvada@linux.intel.com \
--cc=vincent.guittot@linaro.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