aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/cpufreq_ondemand.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_ondemand.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_ondemand.c')
-rw-r--r--drivers/cpufreq/cpufreq_ondemand.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c
index 17741111246b..e69fd8dd1f1c 100644
--- a/drivers/cpufreq/cpufreq_ondemand.c
+++ b/drivers/cpufreq/cpufreq_ondemand.c
@@ -89,7 +89,7 @@ static inline unsigned int get_cpu_idle_time(unsigned int cpu)
89{ 89{
90 return kstat_cpu(cpu).cpustat.idle + 90 return kstat_cpu(cpu).cpustat.idle +
91 kstat_cpu(cpu).cpustat.iowait + 91 kstat_cpu(cpu).cpustat.iowait +
92 ( !dbs_tuners_ins.ignore_nice ? 92 ( dbs_tuners_ins.ignore_nice ?
93 kstat_cpu(cpu).cpustat.nice : 93 kstat_cpu(cpu).cpustat.nice :
94 0); 94 0);
95} 95}
@@ -122,7 +122,7 @@ static ssize_t show_##file_name \
122show_one(sampling_rate, sampling_rate); 122show_one(sampling_rate, sampling_rate);
123show_one(sampling_down_factor, sampling_down_factor); 123show_one(sampling_down_factor, sampling_down_factor);
124show_one(up_threshold, up_threshold); 124show_one(up_threshold, up_threshold);
125show_one(ignore_nice, ignore_nice); 125show_one(ignore_nice_load, ignore_nice);
126 126
127static ssize_t store_sampling_down_factor(struct cpufreq_policy *unused, 127static ssize_t store_sampling_down_factor(struct cpufreq_policy *unused,
128 const char *buf, size_t count) 128 const char *buf, size_t count)
@@ -182,7 +182,7 @@ static ssize_t store_up_threshold(struct cpufreq_policy *unused,
182 return count; 182 return count;
183} 183}
184 184
185static ssize_t store_ignore_nice(struct cpufreq_policy *policy, 185static ssize_t store_ignore_nice_load(struct cpufreq_policy *policy,
186 const char *buf, size_t count) 186 const char *buf, size_t count)
187{ 187{
188 unsigned int input; 188 unsigned int input;
@@ -223,7 +223,7 @@ __ATTR(_name, 0644, show_##_name, store_##_name)
223define_one_rw(sampling_rate); 223define_one_rw(sampling_rate);
224define_one_rw(sampling_down_factor); 224define_one_rw(sampling_down_factor);
225define_one_rw(up_threshold); 225define_one_rw(up_threshold);
226define_one_rw(ignore_nice); 226define_one_rw(ignore_nice_load);
227 227
228static struct attribute * dbs_attributes[] = { 228static struct attribute * dbs_attributes[] = {
229 &sampling_rate_max.attr, 229 &sampling_rate_max.attr,
@@ -231,7 +231,7 @@ static struct attribute * dbs_attributes[] = {
231 &sampling_rate.attr, 231 &sampling_rate.attr,
232 &sampling_down_factor.attr, 232 &sampling_down_factor.attr,
233 &up_threshold.attr, 233 &up_threshold.attr,
234 &ignore_nice.attr, 234 &ignore_nice_load.attr,
235 NULL 235 NULL
236}; 236};
237 237