cpufreq_conservative/ondemand: invert meaning of 'ignore nice'
PATCH 1/1 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 which defaults to '1'; meaning nice'd processes are not 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.
drivers/cpufreq/cpufreq_conservative.c +4 -4
@@ -127,7 +127,7 @@show_one (sampling_down_factor, sampling_down_factor);show_one (up_threshold, up_threshold);show_one (down_threshold, down_threshold); -show_one (ignore_nice, ignore_nice); +show_one (ignore_nice_load, ignore_nice);show_one (freq_step, freq_step); static ssize_t store_sampling_down_factor(struct cpufreq_policy *unused,
@@ -207,7 +207,7 @@return count; } -static ssize_t store_ignore_nice (struct cpufreq_policy *policy, +static ssize_t store_ignore_nice_load (struct cpufreq_policy *policy,const char *buf,size_t count) {unsigned int input;
@@ -272,7 +272,7 @@define_one_rw (sampling_down_factor);define_one_rw (up_threshold);define_one_rw (down_threshold); -define_one_rw (ignore_nice); +define_one_rw (ignore_nice_load);define_one_rw (freq_step);static struct attribute * dbs_attributes[] = {
@@ -282,7 +282,7 @@ &sampling_down_factor.attr, &up_threshold.attr, &down_threshold.attr, - &ignore_nice.attr, + &ignore_nice_load.attr, &freq_step.attr, NULL };
drivers/cpufreq/cpufreq_ondemand.c +4 -4
@@ -119,7 +119,7 @@show_one (sampling_rate, sampling_rate);show_one (sampling_down_factor, sampling_down_factor);show_one (up_threshold, up_threshold); -show_one (ignore_nice, ignore_nice); +show_one (ignore_nice_load, ignore_nice);static ssize_t store_sampling_down_factor (struct cpufreq_policy *unused,const char *buf,size_t count)
@@ -179,7 +179,7 @@return count; } -static ssize_t store_ignore_nice (struct cpufreq_policy *policy, +static ssize_t store_ignore_load_tasks (struct cpufreq_policy *policy,const char *buf,size_t count) {unsigned int input;
@@ -220,7 +220,7 @@define_one_rw (sampling_rate);define_one_rw (sampling_down_factor);define_one_rw (up_threshold); -define_one_rw (ignore_nice); +define_one_rw (ignore_nice_load);static struct attribute * dbs_attributes[] = { &sampling_rate_max.attr,
@@ -228,7 +228,7 @@ &sampling_rate.attr, &sampling_down_factor.attr, &up_threshold.attr, - &ignore_nice.attr, + &ignore_nice_load.attr, NULL };
Quoted 5 lines · Alexander Clouter
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 which defaults to '1'; meaning nice'd processes are not counted towards the 'business' calculation.
Quoted 9 lines
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 <[email protected]>
Great. I get to rewrite my initscript for the ondemand governor to
test for yet another kernel version, and write a 0 to yet another sysfs file, just so that any compile I start in an xterm on my desktop box can make the processor work for its living.
Just what have you cpufreq guys got against nice'd processes ? It's
enough to drive a man to powernowd ;)
Ken
--
das eine Mal als Trag�die, das andere Mal als Farce
Quoted 22 lines · Ken Moffat
Quoted 17 lines · Alexander Clouter
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 which defaults to '1'; meaning nice'd processes are
not 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.Quoted 2 lines
Signed-off-by Alexander Clouter <[email protected]>
Quoted 7 lines
Great. I get to rewrite my initscript for the ondemand governor to
test for yet another kernel version, and write a 0 to yet another sysfs file, just so that any compile I start in an xterm on my desktop box can make the processor work for its living.Just what have you cpufreq guys got against nice'd processes ? It's
enough to drive a man to powernowd ;)
The opinion on this one started out with everyone saying "Yeah, this is dumb, and should have changed". Now that the change appears in a mergable patch, the opinion seems to have swung the other way.
I'm seriously rethinking this change, as no matter what we do, we're going to make some people unhappy, so changing the status quo seems ultimately pointless.
Dave
Quoted 29 lines · Dave Jones
Quoted 20 lines · Ken Moffat
Quoted 17 lines · Alexander Clouter
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 which defaults to '1'; meaning nice'd processes are
not 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.Quoted 1 line
Signed-off-by Alexander Clouter <[email protected]>Quoted 7 lines
Great. I get to rewrite my initscript for the ondemand governor to
test for yet another kernel version, and write a 0 to yet another sysfs file, just so that any compile I start in an xterm on my desktop box can make the processor work for its living.Just what have you cpufreq guys got against nice'd processes ? It's
enough to drive a man to powernowd ;)
Quoted 7 lines
The opinion on this one started out with everyone saying "Yeah, this is dumb, and should have changed". Now that the change appears in a mergable patch, the opinion seems to have swung the other way.
I'm seriously rethinking this change, as no matter what we do, we're going to make some people unhappy, so changing the status quo seems ultimately pointless.
Eh? I thought he was agreeing with niced processes running full speed but that he misunderstood that that was the new default. Oh well I should have just shut up.
Con
Quoted 11 lines · Con Kolivas
Quoted 10 lines
Quoted 2 lines
Just what have you cpufreq guys got against nice'd processes ? It's
enough to drive a man to powernowd ;)The opinion on this one started out with everyone saying "Yeah, this is dumb, and should have changed". Now that the change appears in a mergable patch, the opinion seems to have swung the other way.
I'm seriously rethinking this change, as no matter what we do, we're going to make some people unhappy, so changing the status quo seems ultimately pointless.
Quoted 6 lines
Eh? I thought he was agreeing with niced processes running full speed but that he misunderstood that that was the new default. Oh well I should have just shut up.
Con
Hi Con,
looks as if I did misunderstand the default. In the last week I've
seen occasional comments on this from both sides of the debate, so I read the description and got it wrong.
Now, if you gentlement will excuse me, I'll just wipe this egg off my
face.
Ken
Signature · 1 line
das eine Mal als Tragödie, das andere Mal als Farce
Morning Ken,
Ken Moffat <[email protected]> [20051122 01:21:18 +0000]:
Quoted 18 lines · Alexander Clouter
Quoted 6 lines
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 which defaults to '1'; meaning nice'd processes are not counted towards the 'business' calculation.Quoted 9 lines
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 <[email protected]>
Quoted 8 lines
Great. I get to rewrite my initscript for the ondemand governor to
test for yet another kernel version, and write a 0 to yet another sysfs file, just so that any compile I start in an xterm on my desktop box can make the processor work for its living.Just what have you cpufreq guys got against nice'd processes ? It's
enough to drive a man to powernowd ;)
Con complained about that one too, rightly so. If you look more recently you will see that the default is actually now '0' so nice'd processes do count towards the business calculation....I guess I could submit *another* more or less duplicate patch to really confuse things to rename the sysfs entry again and it to expect a huge prime number to ignore nice'd processes ;)
Guess you can go back to your initscript and remove that entry :P
Cheers
Alex
Quoted 3 lines
Ken
--
das eine Mal als Tragödie, das andere Mal als Farce
Signature · 8 lines
_________________________________
< Absence makes the heart forget. >
---------------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||Hi Alex,
Quoted 12 lines · Alexander Clouter
Morning Ken,
Ken Moffat <[email protected]> [20051122 01:21:18 +0000]:
Quoted 3 lines · Alexander Clouter
Con complained about that one too, rightly so. If you look more recently you will see that the default is actually now '0' so nice'd processes do count towards the business calculation....I guess I could submit *another* more or less duplicate patch to really confuse things to rename the sysfs entry again and it to expect a huge prime number to ignore nice'd processes ;)
Quoted 6 lines
Guess you can go back to your initscript and remove that entry :P
Cheers
Alex
If the default is that nice'd processes do count, then I'm happy (and
I've yet again showed my lack of understanding). Thanks.
Ken
Signature · 1 line
das eine Mal als Trag�die, das andere Mal als Farce
Quoted 5 lines · Alexander Clouter
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 which defaults to '1'; meaning nice'd processes are not counted towards the 'business' calculation.
drivers/cpufreq/cpufreq_ondemand.c:226: error: 'store_ignore_nice_load' undeclared here (not in a function)