Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140612144442.GA821@openwall.com>
Date: Thu, 12 Jun 2014 18:44:43 +0400
From: Solar Designer <solar@...nwall.com>
To: owl-dev@...ts.openwall.com
Subject: CPU power management

Hi,

We need to support CPU power management not only for the old-fashioned
frequency scaling (which is arguably less essential on servers than on
laptops), but also to have Intel's Turbo Boost enabled on many modern
servers (I saw this problem on servers with Xeon 5600 and E5-2600 series
CPUs).  In the latest Owl-current kernel build, I've enabled
CONFIG_CPU_FREQ* and related options like in RHEL5.  Now on servers that
previously ran without Turbo Boost (oops!) it can be enabled with:

modprobe acpi-cpufreq
mount /sys
for d in /sys/devices/system/cpu/cpu*/cpufreq/; do cat $d/scaling_max_freq > $d/scaling_min_freq; done

but that's a hack.  We could make this hack official by including an
improved version of it e.g. in /etc/init.d/turbo, so it could be enabled
or disabled with chkconfig.  However, maybe it'd be better to include a
CPU power management package, like bigger distros do, which would also
take advantage of the CPUs' ability to scale the frequency down below
the base (non-turbo) frequency, thereby saving power.  I guess the same
can be achieved by enabling this sort of governor via sysfs, without a
specialized tool for that, though.

https://wiki.archlinux.org/index.php/Cpufreq

RHEL5 has:

cpufreq-utils-005-3.el5.src.rpm
cpuspeed-1.2.1-11.el5_10.src.rpm

RHEL6 has:

cpufrequtils-007-6.el6.src.rpm
cpupowerutils-1.2-1.el6_5.1.src.rpm
cpuspeed-1.5-20.el6_4.src.rpm

Fedora and RHEL7 have cpupower merged into the kernel source package,
which gets built into kernel-tools binary package:

http://pkgs.fedoraproject.org/cgit/kernel.git/tree/cpupower.config
http://pkgs.fedoraproject.org/cgit/kernel.git/tree/cpupower.service
http://pkgs.fedoraproject.org/cgit/kernel.git/tree/kernel.spec

%package -n kernel-tools
Summary: Assortment of tools for the Linux kernel
Group: Development/System
License: GPLv2
Provides:  cpupowerutils = 1:009-0.6.p1
Obsoletes: cpupowerutils < 1:009-0.6.p1
Provides:  cpufreq-utils = 1:009-0.6.p1
Provides:  cpufrequtils = 1:009-0.6.p1
Obsoletes: cpufreq-utils < 1:009-0.6.p1
Obsoletes: cpufrequtils < 1:009-0.6.p1
Obsoletes: cpuspeed < 1:1.5-16
Requires: kernel-tools-libs = %{version}-%{release}
%description -n kernel-tools
This package contains the tools/ directory from the kernel source
and the supporting documentation.

%package -n kernel-tools-libs
[...]
%package -n kernel-tools-libs-devel
[...]
%package -n kernel-tools-debuginfo
[...]

I guess this is because cpupower has been merged with the Linux kernel
tree upstream:

http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/tools/power/cpupower

How should we approach this?  Temporarily (while we still use kernel
versions that don't have cpupower in tree upstream) and longer term.

Should we introduce cpupowerutils (like in RHEL6) into our package tree
for now, planning to drop it later (when we move to RHEL7'ish kernels)?

What about cpufrequtils - is it obsoleted by cpupowerutils?  But why is
it a separate package in RHEL6, then (why not removed)?  Just for
backwards compatibility, since RHEL6 was(?) released before(?) and
without(?) cpupowerutils in it initially?  And what's cpuspeed for, is
it useful in addition to cpupowerutils?

Alexander

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.