Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 179729 - sys-power/cpufrequtils - ignore_nice_load
Summary: sys-power/cpufrequtils - ignore_nice_load
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement with 1 vote (vote)
Assignee: Mobile Herd (OBSOLETE)
URL: http://www.numa.uni-linz.ac.at/~koch/...
Whiteboard:
Keywords:
: 190997 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-05-25 09:29 UTC by Oliver Koch
Modified: 2010-01-15 12:01 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
/etc/conf.d/cpufrequtils (cpufrequtils,380 bytes, text/plain)
2007-11-10 12:05 UTC, Andrew Spurrier
Details
/etc/init.d/cpufrequtils (cpufrequtils,1.17 KB, text/plain)
2007-11-10 12:09 UTC, Andrew Spurrier
Details
/etc/init.d/cpufrequtils (cpufrequtils,1.17 KB, text/plain)
2007-11-10 12:55 UTC, Andrew Spurrier
Details
/etc/conf.d/cpufrequtils (conf.d_cpufrequtils,465 bytes, text/plain)
2007-11-21 10:22 UTC, Andrew Spurrier
Details
/etc/init.d/cpufrequtils (init.d_cpufrequtils,1.24 KB, text/plain)
2007-11-21 10:24 UTC, Andrew Spurrier
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Koch 2007-05-25 09:29:36 UTC
I think it would be nice to have ignore_nice_load set in the init script of cpufrequtils. Proposed /etc/*(init|conf).d/cpufrequtils are at the given URL.

Reproducible: Always
Comment 1 Andrew Spurrier 2007-11-10 12:05:52 UTC
Created attachment 135622 [details]
/etc/conf.d/cpufrequtils

Added the following 2 ondemand governor options: 
IGNORE_NICE_LOAD=1
SAMPLING_RATE=200000
Comment 2 Andrew Spurrier 2007-11-10 12:09:09 UTC
Created attachment 135624 [details]
/etc/init.d/cpufrequtils

If the ondemand governor is specified then check action the 2 options:
   * IGNORE_NICE_LOAD
   * SAMPLE_RATE
Comment 3 Andrew Spurrier 2007-11-10 12:14:15 UTC
I've attached my modifications to cpufrequtils which I use make the "ondemand" governor ignore the "foldingathome" client on my laptop.
Comment 4 Andrew Spurrier 2007-11-10 12:42:05 UTC
Comment on attachment 135624 [details]
/etc/init.d/cpufrequtils

><HTML><HEAD/><BODY><PRE>#!/sbin/runscript
># Copyright 1999-2006 Gentoo Foundation
># Distributed under the terms of the GNU General Public License v2
># $Header: /var/cvsroot/gentoo-x86/sys-power/cpufrequtils/files/cpufrequtils-init.d,v 1.2 2007/05/17 09:07:35 phreak Exp $
>
>checkconfig() {
>	if [ -z "${GOVERNOR}" ]; then
>		eerror "No governor set in /etc/conf.d/cpufrequtils"
>		return 1
>	fi
>	if [ -z "${RESTORED_GOVERNOR}" ]; then
>		RESTORED_GOVERNOR=performance
>	fi
>}
>
>
>affect_change() {
>	if [ "$#" != "2" ]; then
>		eerror "affect_change called in correctly, need two args, action, and governor"
>		return 1
>	fi
>	local cpu n
>
>	for cpu in /sys/devices/system/cpu/cpu[0-9]*; do
>		n=${cpu##*cpu}
>
>		ebegin "${1} ${2} cpufreq governor on CPU${n}"
>		cpufreq-set -c ${n} -g "${2}"
>
>		if [ "${GOVERNOR}" == "ondemand" ]; then
>			if [ -n "${IGNORE_NICE_LOAD}" ]; then
>				echo ${IGNORE_NICE_LOAD} &gt; $cpu/cpufreq/ondemand/ignore_nice_load
>			fi
>			if [ -n "${SAMPLING_RATE}" ]; then
>				echo ${SAMPLING_RATE} &gt; $cpu/cpufreq/ondemand/sampling_rate
>			fi
>		fi
>		eend ${?}
>	done
>}
>
>
>start() {
>	checkconfig || return 1
>	affect_change "Enabling" "${GOVERNOR}"
>}
>
>stop() {
>	checkconfig || return 1
>	affect_change "Disabling" "${GOVERNOR}"
>}
></PRE></BODY></HTML>
Comment 5 Andrew Spurrier 2007-11-10 12:55:42 UTC
Created attachment 135630 [details]
/etc/init.d/cpufrequtils

sorry I had a hard coded value for the sample rate and I'm not having much fun driving Bugzilla for the first time.
Comment 6 Andrew Spurrier 2007-11-21 10:22:53 UTC
Created attachment 136589 [details]
/etc/conf.d/cpufrequtils

Includes support for the following for the "ondemand" governor:
   * ignore nice load
   * sampling rate

For all governors:
   * minimum frequency
Comment 7 Andrew Spurrier 2007-11-21 10:24:00 UTC
Created attachment 136591 [details]
/etc/init.d/cpufrequtils

Includes support for the following for the "ondemand" governor:
   * ignore nice load
   * sampling rate

For all governors:
   * minimum frequency
Comment 8 SpanKY gentoo-dev 2008-10-20 16:04:38 UTC
cpufrequtils-005 now allows any option that cpufreq-set takes ... as for the reset, i really think that should be set through /etc/sysctl.conf ...
Comment 9 SpanKY gentoo-dev 2010-01-15 07:38:21 UTC
*** Bug 190997 has been marked as a duplicate of this bug. ***
Comment 10 SpanKY gentoo-dev 2010-01-15 07:39:43 UTC
cpufrequtils-006 has a generic-ish init.d script to do this now

SYSFS_EXTRA="ondemand/ignore_nice_load=1 ondemand/up_threshold=70"

this will write 1 to ondemand/ignore_nice_load and 70 to ondemand/up_threshold
Comment 11 Pacho Ramos gentoo-dev 2010-01-15 12:01:01 UTC
Thanks a lot