[2.6.14] Cpufreq_ondemand sysfs names change (was: Re: CPUFreq_ondemand: misnamed ignore_nice attribute)
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 1 line · Alexander Clouter
Hi,
Summary for Andrew Morton:
ondemand's ignore_nice attribute has a reversed meaning, and fixing this requires changing the API for the user playing with sysfs. Thus, it should be fixed ASAP, i.e. 2.6.14.
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/ignore_nice Then ondemand ignores nice tasks when calculating CPU load. echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/ignore_nice Then ondemand considers nice tasks when calculating CPU load.
It's the reverse of the expected behaviour, even Alexander Clouter got confused on it when I first reported this bug.
So I suggest:
*) to flip the flag's behaviour, as discussed with Alexander
*) to rename the flag to ignore_nice_load or ignore_nice_tasks, to avoid burning the user too much. Very few people use it now, but let's help them.
*) Alexander had a piece of doc he wrote about all this and sent me, it'd be nice to have this merged too.
Alexander (quoted near the end) said to have rolled the patches, but they're lost somewhere, don't know if he forgot or they're in some staging tree in-the-middle. I guess I could roll up the patches if needed, but this week I'm really busy, so probably not. I've also forwarded the original docco patch to Andrew Morton and LKML (which didn't receive them in first place).
Quoted 3 lines
Blaisorblade <[email protected]> [20050910 15:36:10 +0200]:
Quoted 2 lines · Alexander Clouter
Quoted 1 line
Hi,
[About the flag behaviour]
Quoted 22 lines
Quoted 7 lines
Quoted 3 lines
I'm all for this to be changed, its a feature that is ment to be for Joe Public to be used, it would be silly of us to not make it easier; it is confusing as it stands.
Ok - hope there's no so much people workarounding for the new behaviour, but they're smart enough to fix their scripts up. Just shout a bit on LKML to say this and we should be ok.
My thinking too, its a relatively new feature and when I have looked around very few userland tools even tinker with ondemand so either we do it now or not at all...or rather we do it later and listen to everyone complain :)
Quoted 6 lines
Quoted 3 lines
Flipping the behaviour of the flag gets my vote. Do you want to roll the patch and I fix up the documentation or do you want to do both, or should do both?
I think it's better that you do that - I'd already so many patches spread in my trees that I'd lose this patch somewhere.
Not a problem. I'll roll them off right now.
Cheers
Signature · 12 lines
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!". Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894) http://www.user-mode-linux.org/~blaisorblade ___________________________________ Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB http://mail.yahoo.it
Hi All,
Blaisorblade <[email protected]> [20050927 18:51:36 +0200]:
Quoted 23 lines · Alexander Clouter
Quoted 1 line
Hi,
Summary for Andrew Morton:
ondemand's
ignore_niceattribute has a reversed meaning, and fixing this requires changing the API for the user playing with sysfs. Thus, it should be fixed ASAP, i.e. 2.6.14.echo 0 >
/sys/devices/system/cpu/cpu0/cpufreq/ondemand/ignore_niceThen ondemand ignores nice tasks when calculating CPU load. echo 1 >/sys/devices/system/cpu/cpu0/cpufreq/ondemand/ignore_niceThen ondemand considers nice tasks when calculating CPU load.It's the reverse of the expected behaviour, even Alexander Clouter got confused on it when I first reported this bug.
So I suggest:
*) to flip the flag's behaviour, as discussed with Alexander*) to rename the flag to
ignore_nice_loadorignore_nice_tasks, to avoid burning the user too much. Very few people use it now, but let's help them.
Quoted 9 lines
*) Alexander had a piece of doc he wrote about all this and sent me, it'd be nice to have this merged too.
Alexander (quoted near the end) said to have rolled the patches, but they're lost somewhere, don't know if he forgot or they're in some staging tree in-the-middle. I guess I could roll up the patches if needed, but this week I'm really busy, so probably not. I've also forwarded the original docco patch to Andrew Morton and LKML (which didn't receive them in first place).
completely my fault, I rolled them at the weekend whilst on a train, lived in effectively a Farraday cage for the weekend (a rural part of England for those who are curious :) and forgot....DOH!
The patches are attached. If everyone likes the look of them, either one of you guys can 'signed off by' or I can to the mailing list.
Cheers
Alex
Quoted 40 lines
Quoted 3 lines
Blaisorblade <[email protected]> [20050910 15:36:10 +0200]:
Quoted 2 lines · Alexander Clouter
Quoted 1 line
Hi,
[About the flag behaviour]
Quoted 22 lines
Quoted 7 lines
Quoted 3 lines
I'm all for this to be changed, its a feature that is ment to be for Joe Public to be used, it would be silly of us to not make it easier; it is confusing as it stands.
Ok - hope there's no so much people workarounding for the new behaviour, but they're smart enough to fix their scripts up. Just shout a bit on LKML to say this and we should be ok.
My thinking too, its a relatively new feature and when I have looked around very few userland tools even tinker with ondemand so either we do it now or not at all...or rather we do it later and listen to everyone complain :)
Quoted 6 lines
Quoted 3 lines
Flipping the behaviour of the flag gets my vote. Do you want to roll the patch and I fix up the documentation or do you want to do both, or should do both?
I think it's better that you do that - I'd already so many patches spread in my trees that I'd lose this patch somewhere.
Not a problem. I'll roll them off right now.
Cheers
Signature · 12 lines
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!". Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894) http://www.user-mode-linux.org/~blaisorblade ___________________________________ Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB http://mail.yahoo.it
Signature · 9 lines
______________________________________
/ We have seen the light at the end of \
\ the tunnel, and it's out. /
--------------------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||drivers/cpufreq/cpufreq_conservative.c +2 -2
@@ -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 ();
drivers/cpufreq/cpufreq_ondemand.c +2 -2
@@ -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 (); }
Documentation/cpu-freq/governors.txt +58 -2
73 lines not on this page · raw message
Re: [2.6.14] Cpufreq_ondemand sysfs names change
In reply to BlaisorbladeQuoted 2 lines · Blaisorblade
*) to rename the flag to
ignore_nice_loadorignore_nice_tasks, to avoid burning the user too much. Very few people use it now, but let's help them.
I use it and i have even "fixed" my applications to use the "wrong" flag.
Quoted 3 lines
Quoted 3 lines
My thinking too, its a relatively new feature and when I have looked around very few userland tools even tinker with ondemand so either we do it now or not at all...or rather we do it later and listen to everyone complain :)
so the early birds are doomed? ;-)
I'll bite the bullet if this "flip the meaning" gets in, but i don't like it. I'll have to check for the kernel version in my userspace code, then which is generally a bad idea IMO.
Signature · 3 lines
Stefan Seyfried \ "I didn't want to write for pay. I QA / R&D Team Mobile Devices \ wanted to be paid for what I write." SUSE LINUX Products GmbH, Nürnberg \ -- Leonard Cohen
Re: [2.6.14] Cpufreq_ondemand sysfs names change
Stefan Seyfried <[email protected]> [20050929 10:54:01 +0200]:
Quoted 7 lines
Quoted 4 lines
Quoted 4 lines
My thinking too, its a relatively new feature and when I have looked around very few userland tools even tinker with ondemand so either we do it now or not at all...or rather we do it later and listen to everyone complain :)
so the early birds are doomed? ;-)
they don't call it *bleeding* edge for no reason ;) I'll promise not to flip it back again, deal?
Quoted 4 lines
I'll bite the bullet if this "flip the meaning" gets in, but i don't like it. I'll have to check for the kernel version in my userspace code, then which is generally a bad idea IMO.
I agree, its messy that this was not dealt with on day one before the code was even merged but the meaning is logically the other way round to what you would expect it to mean from reading the sysfs name. Joe Public is going to get confused on this one, rightly so too.
Cheers
Alex
Quoted 4 lines
Signature · 3 lines
Stefan Seyfried \ "I didn't want to write for pay. I QA / R&D Team Mobile Devices \ wanted to be paid for what I write." SUSE LINUX Products GmbH, Nürnberg \ -- Leonard Cohen
Signature · 9 lines
______________________________________
/ A day without sunshine is like a day \
\ without Anita Bryant. /
--------------------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||Re: [2.6.14] Cpufreq_ondemand sysfs names change
In reply to Stefan SeyfriedQuoted 6 lines · Stefan Seyfried
Quoted 3 lines · Blaisorblade
*) to rename the flag to
ignore_nice_loadorignore_nice_tasks, to avoid burning the user too much. Very few people use it now, but let's help them.I use it and i have even "fixed" my applications to use the "wrong" flag.
Me too, but it's a trivial script in my case.
Quoted 9 lines
Quoted 4 lines
Quoted 4 lines
My thinking too, its a relatively new feature and when I have looked around very few userland tools even tinker with ondemand so either we do it now or not at all...or rather we do it later and listen to everyone complain :)
so the early birds are doomed? ;-)
I'll bite the bullet if this "flip the meaning" gets in, but i don't like it. I'll have to check for the kernel version in my userspace code, then which is generally a bad idea IMO.
That's why I proposed renaming the sysfs file, and then you can test with "test -f" (in bash).
Signature · 12 lines
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!". Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894) http://www.user-mode-linux.org/~blaisorblade ___________________________________ Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB http://mail.yahoo.it