From 0b31296d95d2e0f18abf69f30d0946e3a1f35672 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 15 Jan 2012 23:14:56 +0000 Subject: Sun Jan 15 23:14:55 UTC 2012 --- community/linux-tools/PKGBUILD | 27 +++++++++++++++------------ community/linux-tools/cpupower.conf | 28 +++++++++++++++++++++------- community/linux-tools/cpupower.rc | 32 +++++++++++++++++++++----------- community/linux-tools/cpupower.service | 10 ++++++++++ community/percona-server/PKGBUILD | 6 +++--- community/redis/PKGBUILD | 6 +++--- 6 files changed, 73 insertions(+), 36 deletions(-) create mode 100644 community/linux-tools/cpupower.service (limited to 'community') diff --git a/community/linux-tools/PKGBUILD b/community/linux-tools/PKGBUILD index 345d8f9ad..026c0aa1d 100644 --- a/community/linux-tools/PKGBUILD +++ b/community/linux-tools/PKGBUILD @@ -1,12 +1,12 @@ -# $Id: PKGBUILD 61664 2012-01-06 00:12:09Z seblu $ -# Maintainer: Sebastien Luttringer +# $Id: PKGBUILD 62053 2012-01-15 02:27:29Z seblu $ +# Maintainer: Sébastien Luttringer pkgbase=linux-tools pkgname=('perf' 'cpupower') pkgver=3.2 -kernver=${pkgver} +kernver=${pkgver}.1 [[ ${kernver##*rc} != $kernver ]] && testing='testing' -pkgrel=1 +pkgrel=2 license=('GPL2') arch=('i686' 'x86_64') url='http://www.kernel.org' @@ -16,16 +16,18 @@ makedepends=('asciidoc' 'xmlto') makedepends+=('python2' 'libnewt' 'elfutils' 'pciutils') source=("http://ftp.kernel.org/pub/linux/kernel/v3.0/$testing/linux-$kernver.tar.xz" 'cpupower.rc' - 'cpupower.conf') -md5sums=('364066fa18767ec0ae5f4e4abcf9dc51' - 'd8b119eff7dc1a2d655eb71a47fa6215' - '218fd36a7957d3170ed8bd1a0be1f62f') + 'cpupower.conf' + 'cpupower.service') +md5sums=('cd2f8b7752c85c337af809391f4afb94' + '26af384ca282bc0dc38ff65acc7bb4b9' + '857ccdd0598511e3bf4b63522754dc48' + '20870541e88109d2f153be3c58a277f1') build() { msg2 'Build perf' cd linux-$kernver/tools/perf - make PYTHON=python2 DESTDIR="${pkgdir}/usr" perfexecdir="lib/$pkgname" PERF_VERSION=$pkgver-$pkgrel \ - all man + make PYTHON=python2 DESTDIR="${pkgdir}/usr" perfexecdir="lib/$pkgname" \ + PERF_VERSION=$pkgver-$pkgrel all man msg2 'Build cpupower' # we cannot use --as-needed @@ -39,8 +41,8 @@ package_perf() { depends=('python2' 'libnewt' 'elfutils') cd linux-${kernver}/tools/perf - make PYTHON=python2 DESTDIR="${pkgdir}/usr" perfexecdir="lib/$pkgname" PERF_VERSION=$pkgver \ - install install-man + make PYTHON=python2 DESTDIR="${pkgdir}/usr" perfexecdir="lib/$pkgname" \ + PERF_VERSION=$pkgver install install-man } package_cpupower() { @@ -52,6 +54,7 @@ package_cpupower() { # install rc.d script install -D -m 755 cpupower.rc "$pkgdir/etc/rc.d/cpupower" install -D -m 644 cpupower.conf "$pkgdir/etc/conf.d/cpupower" + install -D -m 644 cpupower.service "$pkgdir/lib/systemd/system/cpupower.service" cd linux-$kernver/tools/power/cpupower make \ diff --git a/community/linux-tools/cpupower.conf b/community/linux-tools/cpupower.conf index 0f56836b1..ee8602953 100644 --- a/community/linux-tools/cpupower.conf +++ b/community/linux-tools/cpupower.conf @@ -1,14 +1,28 @@ -# valid governors: -# ondemand, performance, powersave, -# conservative, userspace -#governor="ondemand" +# Define CPUs governor +# valid governors: ondemand, performance, powersave, conservative, userspace. +#governor='ondemand' -# limit frequency range (optional) -# valid suffixes: Hz, kHz (default), MHz, GHz, THz +# Limit frequency range +# Valid suffixes: Hz, kHz (default), MHz, GHz, THz #min_freq="2.25GHz" #max_freq="3GHz" -# use freq to set up the exact cpu frequency using it with userspace governor +# Specific frequency to be set. +# Requires userspace governor to be available and loaded. #freq= +# Utilizes cores in one processor package/socket first before processes are +# scheduled to other processor packages/sockets. +# See man (1) CPUPOWER-SET for additional details. +#mc_scheduler= + +# Utilizes thread siblings of one processor core first before processes are +# scheduled to other cores. See man (1) CPUPOWER-SET for additional details. +#smp_scheduler= + +# Sets a register on supported Intel processore which allows software to convey +# its policy for the relative importance of performance versus energy savings to +# the processor. See man (1) CPUPOWER-SET for additional details. +#perf_bias= + # vim:set ts=2 sw=2 ft=sh et: diff --git a/community/linux-tools/cpupower.rc b/community/linux-tools/cpupower.rc index 812637b61..9b0bcddb7 100644 --- a/community/linux-tools/cpupower.rc +++ b/community/linux-tools/cpupower.rc @@ -8,19 +8,29 @@ case "$1" in start|restart) stat_busy "Setting cpupower rules" + declare -i fail=0 - declare params='' - if [[ "$governor" ]]; then - params="-g $governor " - params+="${min_freq:+-d $min_freq} " - params+="${max_freq:+-u $max_freq} " - params+="${freq:+-f $freq} " - cpupower frequency-set $params >/dev/null || { stat_fail; exit 1; } - stat_done - else - stat_append ': Invalid configuration' - stat_fail + # frequency-set options + declare -a params=() + params+=(${governor:+-g $governor}) + params+=(${min_freq:+-d $min_freq}) + params+=(${max_freq:+-u $max_freq}) + params+=(${freq:+-f $freq}) + if ((${#params[@]} > 0)); then + cpupower frequency-set "${params[@]}" >/dev/null || fail=1 fi + + # set options + declare -a params=() + params+=(${mc_scheduler:+-m $mc_scheduler}) + params+=(${smp_scheduler:+-s $smp_scheduler}) + params+=(${perf_bias:+-b $perf_bias}) + if ((${#params[@]} > 0)); then + cpupower set "${params[@]}" >/dev/null || fail=1 + fi + + # print failure if any + (($fail > 0)) && stat_fail && exit 1 || stat_done ;; *) echo "usage: $0 {start|restart}" diff --git a/community/linux-tools/cpupower.service b/community/linux-tools/cpupower.service new file mode 100644 index 000000000..f77cfdc97 --- /dev/null +++ b/community/linux-tools/cpupower.service @@ -0,0 +1,10 @@ +[Unit] +Description=Apply cpupower configuration + +[Service] +Type=oneshot +ExecStart=/etc/rc.d/cpupower start +RemainAfterExit=yes + +[Install] +WantedBy=multi-user.target diff --git a/community/percona-server/PKGBUILD b/community/percona-server/PKGBUILD index 4a03ded15..3eea37da6 100644 --- a/community/percona-server/PKGBUILD +++ b/community/percona-server/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Massimiliano Torromeo pkgname=percona-server -pkgver=5.5.18_rel23.0 +pkgver=5.5.19_rel24.0 pkgrel=1 pkgdesc="A backwards-compatible drop-in replacement for MySQL that provides improved performance, diagnostics and instrumentation, and manageability of the server" arch=('i686' 'x86_64') @@ -17,7 +17,7 @@ url="http://www.percona.com/software/percona-server/" options=('!libtool' 'emptydirs') backup=('etc/mysql/my.cnf') install=percona.install -source=("http://www.percona.com/redir/downloads/Percona-Server-${pkgver%.*_*}/Percona-Server-${pkgver/_rel/-}/Percona-Server-${pkgver/_/-}.tar.gz" +source=("http://www.percona.com/downloads/Percona-Server-${pkgver%.*_*}/Percona-Server-${pkgver/_rel/-}/source/Percona-Server-${pkgver/_/-}.tar.gz" 'mysqld' 'my.cnf') @@ -98,6 +98,6 @@ package() { install -dm700 "${pkgdir}"/var/lib/mysql } -md5sums=('17b266f5c10d01838522188f313a1ead' +md5sums=('eb8c21bbb8179e0a4709d51c037e682c' '243864805611764a7e5883c1dba7afd8' '1c949c0dbea5206af0db14942d9927b6') diff --git a/community/redis/PKGBUILD b/community/redis/PKGBUILD index 44788d319..1d6f2f102 100644 --- a/community/redis/PKGBUILD +++ b/community/redis/PKGBUILD @@ -1,10 +1,10 @@ -# $Id: PKGBUILD 61232 2011-12-25 17:05:47Z spupykin $ +# $Id: PKGBUILD 62009 2012-01-14 09:42:42Z spupykin $ # Maintainer: Sergej Pupykin # Maintainer: Jan-Erik Rediger # Contributor: nofxx .com> pkgname=redis -pkgver=2.4.5 +pkgver=2.4.6 pkgrel=1 pkgdesc="Advanced key-value store" arch=('i686' 'x86_64') @@ -18,7 +18,7 @@ backup=("etc/redis.conf" source=("http://redis.googlecode.com/files/${pkgname}-${pkgver}.tar.gz" "redis.d" "redis.logrotate") -md5sums=('babeb1a1d05281b5e00ca0a519cfc3f9' +md5sums=('41d394074bcde762872ecb5506f35aee' '9726d06d0a0c60cb5d55a31b3dc1e55d' '9e2d75b7a9dc421122d673fe520ef17f') -- cgit v1.2.3-54-g00ecf