public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch 1/1] cpufreq_conservative: invert meaning of 'ignore_nice'
@ 2005-09-29  8:44 Alexander Clouter
  2005-09-29 11:46 ` Blaisorblade
  0 siblings, 1 reply; 5+ messages in thread
From: Alexander Clouter @ 2005-09-29  8:44 UTC (permalink / raw)
  To: LKML, cpufreq; +Cc: Andrew Morton, Dave Jones, Blaisorblade, alex-kernel


[-- Attachment #1.1: Type: text/plain, Size: 656 bytes --]

The use of the 'ignore_nice' sysfs file is confusing to anyone using.  This 
patch makes it so when you now set it to the default value of 1, process nice 
time is also ignored in the cpu 'busyness' calculation.

Prior to this patch to set it to '1' to make process nice time count...even 
confused me :)

WARNING: this obvious breaks any userland tools that expect things to be the 
other way round.  This patch clears up the confusion but should go in ASAP as 
at the moment it seems very few tools even make use of this functionality; 
all I could find was a Gentoo Wiki entry.

Signed-off-by: Alexander Clouter <alex-kernel@digriz.org.uk>

[-- Attachment #1.2: 01_inverse_ignore_nice_flag.diff --]
[-- Type: text/plain, Size: 1617 bytes --]

diff -u linux-2.6.13.orig/drivers/cpufreq/cpufreq_conservative.c linux-2.6.13/drivers/cpufreq/cpufreq_conservative.c
--- linux-2.6.13.orig/drivers/cpufreq/cpufreq_conservative.c	2005-09-23 15:24:46.605223250 +0100
+++ linux-2.6.13/drivers/cpufreq/cpufreq_conservative.c	2005-09-23 15:24:30.740231750 +0100
@@ -93,7 +93,7 @@
 {
 	return	kstat_cpu(cpu).cpustat.idle +
 		kstat_cpu(cpu).cpustat.iowait +
-		( !dbs_tuners_ins.ignore_nice ? 
+		( dbs_tuners_ins.ignore_nice ? 
 		  kstat_cpu(cpu).cpustat.nice :
 		  0);
 }
@@ -515,7 +515,7 @@
 			def_sampling_rate = (latency / 1000) *
 					DEF_SAMPLING_RATE_LATENCY_MULTIPLIER;
 			dbs_tuners_ins.sampling_rate = def_sampling_rate;
-			dbs_tuners_ins.ignore_nice = 0;
+			dbs_tuners_ins.ignore_nice = 1;
 			dbs_tuners_ins.freq_step = 5;
 
 			dbs_timer_init();
diff -u linux-2.6.13.orig/drivers/cpufreq/cpufreq_ondemand.c linux-2.6.13/drivers/cpufreq/cpufreq_ondemand.c
--- linux-2.6.13.orig/drivers/cpufreq/cpufreq_ondemand.c	2005-09-23 15:24:46.609223500 +0100
+++ linux-2.6.13/drivers/cpufreq/cpufreq_ondemand.c	2005-09-23 15:24:08.846863500 +0100
@@ -86,7 +86,7 @@
 {
 	return	kstat_cpu(cpu).cpustat.idle +
 		kstat_cpu(cpu).cpustat.iowait +
-		( !dbs_tuners_ins.ignore_nice ? 
+		( dbs_tuners_ins.ignore_nice ? 
 		  kstat_cpu(cpu).cpustat.nice :
 		  0);
 }
@@ -424,7 +424,7 @@
 			def_sampling_rate = (latency / 1000) *
 					DEF_SAMPLING_RATE_LATENCY_MULTIPLIER;
 			dbs_tuners_ins.sampling_rate = def_sampling_rate;
-			dbs_tuners_ins.ignore_nice = 0;
+			dbs_tuners_ins.ignore_nice = 1;
 
 			dbs_timer_init();
 		}

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-09-30 15:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-29  8:44 [patch 1/1] cpufreq_conservative: invert meaning of 'ignore_nice' Alexander Clouter
2005-09-29 11:46 ` Blaisorblade
2005-09-29 21:51   ` Dave Jones
2005-09-30 13:56     ` Stefan Seyfried
2005-09-30  8:09   ` Alexander Clouter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox