From: Andrew Morton <akpm@linux-foundation.org>
To: Len Brown <lenb@kernel.org>
Cc: linux-pm@lists.linux-foundation.org,
linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,
x86@kernel.org
Subject: Re: [PATCH] tools: add x86_energy_perf_policy to program MSR_IA32_ENERGY_PERF_BIAS
Date: Tue, 26 Oct 2010 20:23:07 -0700 [thread overview]
Message-ID: <20101026202307.c028e26c.akpm@linux-foundation.org> (raw)
In-Reply-To: <alpine.LFD.2.00.1010230035360.29399@localhost.localdomain>
On Sat, 23 Oct 2010 00:40:18 -0400 (EDT) Len Brown <lenb@kernel.org> wrote:
> MSR_IA32_ENERGY_PERF_BIAS first became available on Westmere Xeon.
> It is implemented in all Sandy Bridge processors -- mobile, desktop and server.
> It is expected to become increasingly important in subsequent generations.
>
> x86_energy_perf_policy is a user-space utility to set this
> hardware energy vs performance policy hint in the processor.
> Most systems would benefit from "x86_energy_perf_policy normal"
> at system startup, as the hardware default is maximum performance
> at the expense of energy efficiency. See the comments
> in the source code for more information.
>
> Linux-2.6.36 added "epb" to /proc/cpuinfo to indicate
> if an x86 processor supports MSR_IA32_ENERGY_PERF_BIAS,
> though the kernel does not actually program the MSR.
>
> In March, Venkatesh Pallipadi proposed a small driver
> that programmed MSR_IA32_ENERGY_PERF_BIAS, based on
> the cpufreq governor in use. It also offered
> a boot-time cmdline option to override.
> http://lkml.org/lkml/2010/3/4/457
> But hiding the hardware policy behind the
> governor choice was deemed "kinda icky".
>
> So in June, I proposed a generic user/kernel API to
> consolidate the power/performance policy trade-off.
> "RFC: /sys/power/policy_preference"
> http://lkml.org/lkml/2010/6/16/399
> That is my preference for implementing this capability,
> but I received no support on the list.
>
> So in September, I sent x86_energy_perf_policy.c to LKML,
> a user-space utility that scribbles directly to the MSR.
> http://lkml.org/lkml/2010/9/28/246
>
> Here is the same utility re-sent, this time proposed
> to reside in the kernel tools directory.
>
> Signed-off-by: Len Brown <len.brown@intel.com>
> ---
> tools/power/x86/x86_energy_perf_policy/Makefile | 7 +
> .../x86_energy_perf_policy.c | 358 ++++++++++++++++++++
> 2 files changed, 365 insertions(+), 0 deletions(-)
> create mode 100644 tools/power/x86/x86_energy_perf_policy/Makefile
> create mode 100644 tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c
tools/power/x86, eh? It seems a better place than under
Documentation/, where such things have thus far landed!
I looked briefly, wondering about the kbuild situation. It doesn't
appear to be wired up, so one has to manually enter that directory and
type `make'?
I guess that's OK as an interim thing but longer-term I suppose we
should have some more complete build and deployment system. So
(thinking out loud) a `make' would invoke a `make tools', and that
`make tools' would build the tools which are specific to the target
arch[*], and any generic ones. And a `make tools_install' would install
those tools in, I guess, /lib/modules/$(uname -r)/bin.
Or something else. We'd need input from the distro guys to get this
right.
[*]: building tools for the `target arch' would require a far more
extensive cross-build environment than is needed for just kernel
cross-compilation. This is perhaps Just Too Hard and perhaps a `make
tools_install' should copy the *source* into /lib/modules/$(uname
-r)/src and you then finish the build on the target. Or something
else. The mind boggles.
So for now, just parking the source down in ./tools/ and deferring the
problem sounds a fine idea ;)
A number of programs down under Documentation/ should be moved into
tools/ as well.
next prev parent reply other threads:[~2010-10-27 3:23 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-16 21:05 RFC: /sys/power/policy_preference Len Brown
2010-06-16 22:12 ` Jason Chagas
2010-06-17 18:44 ` Len Brown
2010-06-17 6:03 ` [linux-pm] " Igor.Stoppa
2010-06-17 6:03 ` Igor.Stoppa
2010-06-17 19:00 ` Len Brown
2010-06-17 16:14 ` Victor Lowther
2010-06-17 19:02 ` Len Brown
2010-06-17 22:23 ` Victor Lowther
2010-06-17 22:23 ` Victor Lowther
2010-06-18 5:56 ` Len Brown
2010-06-18 11:55 ` Victor Lowther
2010-06-19 15:17 ` Vaidyanathan Srinivasan
2010-06-19 19:04 ` Rafael J. Wysocki
2010-06-19 19:04 ` Rafael J. Wysocki
2010-06-17 20:48 ` Mike Chan
2010-06-18 6:25 ` Len Brown
2010-06-21 20:10 ` [linux-pm] " Dipankar Sarma
2010-09-28 16:17 ` x86_energy_perf_policy.c Len Brown
2010-10-23 4:40 ` [PATCH] tools: add x86_energy_perf_policy to program MSR_IA32_ENERGY_PERF_BIAS Len Brown
2010-10-27 3:23 ` Andrew Morton [this message]
2010-10-27 6:01 ` Ingo Molnar
2010-10-27 11:43 ` Arnaldo Carvalho de Melo
2010-10-27 11:43 ` Arnaldo Carvalho de Melo
2010-10-27 6:01 ` Ingo Molnar
2010-10-27 3:23 ` Andrew Morton
2010-11-15 16:07 ` [PATCH RESEND] tools: add power/x86/x86_energy_perf_policy " Len Brown
2010-11-15 16:07 ` Len Brown
2010-11-17 11:35 ` Andi Kleen
2010-11-17 11:35 ` Andi Kleen
2010-11-22 20:13 ` Len Brown
2010-11-22 20:13 ` Len Brown
2010-11-22 20:33 ` Andi Kleen
2010-11-22 20:33 ` Andi Kleen
2010-11-23 4:48 ` Len Brown
2010-11-23 4:48 ` Len Brown
2010-11-24 5:31 ` [PATCH v2] tools: create power/x86/x86_energy_perf_policy Len Brown
2010-11-24 5:31 ` Len Brown
2010-11-25 5:52 ` Chen Gong
2010-11-25 5:52 ` Chen Gong
2010-11-25 5:52 ` Chen Gong
2010-11-25 8:59 ` Chen Gong
2010-11-25 8:59 ` Chen Gong
2010-11-25 8:59 ` Chen Gong
2010-10-23 4:40 ` [PATCH] tools: add x86_energy_perf_policy to program MSR_IA32_ENERGY_PERF_BIAS Len Brown
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=20101026202307.c028e26c.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=x86@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.