aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/cpufreq_conservative.c
diff options
context:
space:
mode:
authorAlexander Clouter <alex@digriz.org.uk>2005-12-01 04:09:25 -0500
committerDave Jones <davej@redhat.com>2005-12-01 04:23:23 -0500
commit001893cda2f280ab882164737a0b608208524809 (patch)
tree99e25fb9dc8f525a66c9e04d9109e008b3141200 /drivers/cpufreq/cpufreq_conservative.c
parent6df8900676c3f5c133328332fb8ad889fd0cc9e3 (diff)
[PATCH] cpufreq_conservative/ondemand: invert meaning of 'ignore nice'
The use of the 'ignore_nice' sysfs file is confusing to anyone using it. This removes the sysfs file 'ignore_nice' and in its place creates a 'ignore_nice_load' entry that defaults to '0'; meaning nice'd processes _are_ counted towards the 'business' calculation. WARNING: this obvious breaks any userland tools that expected ignore_nice' to exist, to draw attention to this fact it was concluded on the mailing list that the entry should be removed altogether so the userland app breaks and so the author can build simple to detect workaround. Having said that it seems currently 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> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Dave Jones <davej@redhat.com>
Diffstat (limited to 'drivers/cpufreq/cpufreq_conservative.c')
-rw-r--r--drivers/cpufreq/cpufreq_conservative.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/cpufreq/cpufreq_conservative.c b/drivers/cpufreq/cpufreq_conservative.c
index 2ed5c4363b53..39543a2bed0f 100644
--- a/drivers/cpufreq/cpufreq_conservative.c
+++ b/drivers/cpufreq/cpufreq_conservative.c
@@ -93,7 +93,7 @@ static inline unsigned int get_cpu_idle_time(unsigned int cpu)
93{ 93{
94 return kstat_cpu(cpu).cpustat.idle + 94 return kstat_cpu(cpu).cpustat.idle +
95 kstat_cpu(cpu).cpustat.iowait + 95 kstat_cpu(cpu).cpustat.iowait +
96 ( !dbs_tuners_ins.ignore_nice ? 96 ( dbs_tuners_ins.ignore_nice ?
97 kstat_cpu(cpu).cpustat.nice : 97 kstat_cpu(cpu).cpustat.nice :
98 0); 98 0);
99} 99}
@@ -127,7 +127,7 @@ show_one(sampling_rate, sampling_rate);
127show_one(sampling_down_factor, sampling_down_factor); 127show_one(sampling_down_factor, sampling_down_factor);
128show_one(up_threshold, up_threshold); 128show_one(up_threshold, up_threshold);
129show_one(down_threshold, down_threshold); 129show_one(down_threshold, down_threshold);
130show_one(ignore_nice, ignore_nice); 130show_one(ignore_nice_load, ignore_nice);
131show_one(freq_step, freq_step); 131show_one(freq_step, freq_step);
132 132
133static ssize_t store_sampling_down_factor(struct cpufreq_policy *unused, 133static ssize_t store_sampling_down_factor(struct cpufreq_policy *unused,
@@ -207,7 +207,7 @@ static ssize_t store_down_threshold(struct cpufreq_policy *unused,
207 return count; 207 return count;
208} 208}
209 209
210static ssize_t store_ignore_nice(struct cpufreq_policy *policy, 210static ssize_t store_ignore_nice_load(struct cpufreq_policy *policy,
211 const char *buf, size_t count) 211 const char *buf, size_t count)
212{ 212{
213 unsigned int input; 213 unsigned int input;
@@ -272,7 +272,7 @@ define_one_rw(sampling_rate);
272define_one_rw(sampling_down_factor); 272define_one_rw(sampling_down_factor);
273define_one_rw(up_threshold); 273define_one_rw(up_threshold);
274define_one_rw(down_threshold); 274define_one_rw(down_threshold);
275define_one_rw(ignore_nice); 275define_one_rw(ignore_nice_load);
276define_one_rw(freq_step); 276define_one_rw(freq_step);
277 277
278static struct attribute * dbs_attributes[] = { 278static struct attribute * dbs_attributes[] = {
@@ -282,7 +282,7 @@ static struct attribute * dbs_attributes[] = {
282 &sampling_down_factor.attr, 282 &sampling_down_factor.attr,
283 &up_threshold.attr, 283 &up_threshold.attr,
284 &down_threshold.attr, 284 &down_threshold.attr,
285 &ignore_nice.attr, 285 &ignore_nice_load.attr,
286 &freq_step.attr, 286 &freq_step.attr,
287 NULL 287 NULL
288}; 288};