All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nanley Chery <nanleychery at gmail.com>
To: powertop@lists.01.org
Subject: [Powertop] [PATCH 1/1] tunable: update sched_mc_power_savings target value
Date: Wed, 13 Aug 2014 21:28:05 -0400	[thread overview]
Message-ID: <1407979685-1745-2-git-send-email-nanleychery@gmail.com> (raw)
In-Reply-To: 1407979685-1745-1-git-send-email-nanleychery@gmail.com

[-- Attachment #1: Type: text/plain, Size: 1307 bytes --]

Starting in kernel 2.6.29, the highest power savings level increased to "2".
However, in kernel 3.5, the sched power savings feature was removed altogether.

Signed-off-by: Nanley Chery <nanleychery(a)gmail.com>
---
 src/tuning/tuning.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/tuning/tuning.cpp b/src/tuning/tuning.cpp
index 6367a20..ea1905b 100644
--- a/src/tuning/tuning.cpp
+++ b/src/tuning/tuning.cpp
@@ -28,6 +28,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <ncurses.h>
+#include <linux/version.h>
 
 
 #include "tuning.h"
@@ -58,7 +59,9 @@ static void init_tuning(void)
 {
 	add_sysfs_tunable(_("Enable Audio codec power management"), "/sys/module/snd_hda_intel/parameters/power_save", "1");
 	add_sysfs_tunable(_("NMI watchdog should be turned off"), "/proc/sys/kernel/nmi_watchdog", "0");
-	add_sysfs_tunable(_("Power Aware CPU scheduler"), "/sys/devices/system/cpu/sched_mc_power_savings", "1");
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(3,4,0)
+	add_sysfs_tunable(_("Power Aware CPU scheduler"), "/sys/devices/system/cpu/sched_mc_power_savings", "2");
+#endif
 	add_sysfs_tunable(_("VM writeback timeout"), "/proc/sys/vm/dirty_writeback_centisecs", "1500");
 	add_sata_tunables();
 	add_usb_tunables();
-- 
2.0.4


             reply	other threads:[~2014-08-14  1:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-14  1:28 Nanley Chery [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-08-19 11:49 [Powertop] [PATCH 1/1] tunable: update sched_mc_power_savings target value Sergey Senozhatsky
2014-08-19 18:21 Nanley Chery
2014-08-23  1:10 Alexandra Yates
2014-08-23  4:38 Nanley Chery
2014-09-29 17:43 Alexandra Yates
2014-09-30 21:16 Nanley Chery
2014-09-30 22:46 Alexandra Yates
2014-10-01  2:56 Nanley Chery

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=1407979685-1745-2-git-send-email-nanleychery@gmail.com \
    --to=powertop@lists.01.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.