summaryrefslogtreecommitdiff
blob: fa591a855ae57e753fed3841fbcbebb750544bd3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From a2069c4ea3b83090219c82878c38ea0432bf49ed Mon Sep 17 00:00:00 2001
From: Ultrabug <ultrabug@gentoo.org>
Date: Wed, 3 May 2017 17:21:55 +0200
Subject: [PATCH 04/13] cpuscaling setup: add support for gentoo linux

---
 dist/common/scripts/scylla_cpuscaling_setup | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/dist/common/scripts/scylla_cpuscaling_setup b/dist/common/scripts/scylla_cpuscaling_setup
index 5d02ae51..1089a77a 100755
--- a/dist/common/scripts/scylla_cpuscaling_setup
+++ b/dist/common/scripts/scylla_cpuscaling_setup
@@ -12,6 +12,16 @@ if is_debian_variant; then
         systemctl enable cpufrequtils.service
     fi
     service cpufrequtils start
+elif is_gentoo_variant; then
+    emerge -uq sys-power/cpupower
+    sed -e 's/--governor ondemand/--governor performance/g' -i /etc/conf.d/cpupower
+    if is_systemd; then
+        systemctl enable cpupower-frequency-set.service
+        systemctl start cpupower-frequency-set.service
+    else
+        rc-update add cpupower default
+        service cpupower start
+    fi
 else
     yum install -y cpupowerutils || true
     echo 'CPUPOWER_START_OPTS="frequency-set -g performance"' > /etc/sysconfig/cpupower
-- 
2.12.2