2005-09-29 08:49:59

by Alexander Clouter

[permalink] [raw]
Subject: [patch 1/1] cpufreq_conservative: invert meaning of 'ignore_nice'

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 <[email protected]>


Attachments:
(No filename) (0.00 B)
signature.asc (189.00 B)
Digital signature
Download all attachments

2005-09-29 19:21:53

by Blaisorblade

[permalink] [raw]
Subject: Re: [patch 1/1] cpufreq_conservative: invert meaning of 'ignore_nice'

On Thursday 29 September 2005 10:44, Alexander Clouter wrote:
> 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.

My suggestion on this is to rename the flag too, as ignore_nice_load (or
ignore_nice_tasks, choose your way). Don't forget to do it in docs too.

So userspace tools will error out rather than do the reverse of what they were
doing, and the user will fix the thing according to the (new) docs.

This is the way we avoid problems in kernel code, when changing APIs (I read
Linus talking about this), so I assume it's ok?

--
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

2005-09-29 21:52:34

by Dave Jones

[permalink] [raw]
Subject: Re: [patch 1/1] cpufreq_conservative: invert meaning of 'ignore_nice'

On Thu, Sep 29, 2005 at 01:46:33PM +0200, Blaisorblade wrote:
> On Thursday 29 September 2005 10:44, Alexander Clouter wrote:
> > 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.
>
> My suggestion on this is to rename the flag too, as ignore_nice_load (or
> ignore_nice_tasks, choose your way). Don't forget to do it in docs too.
>
> So userspace tools will error out rather than do the reverse of what they were
> doing, and the user will fix the thing according to the (new) docs.

Agreed. If we change this, we change it completely.
Stefan already mentioned his app will break, and we typically don't
find out about widespread breakage until after we ship a release.

Dave

2005-09-30 08:11:50

by Alexander Clouter

[permalink] [raw]
Subject: Re: [patch 1/1] cpufreq_conservative: invert meaning of 'ignore_nice'

Blaisorblade <[email protected]> [20050929 13:46:33 +0200]:
>
> On Thursday 29 September 2005 10:44, Alexander Clouter wrote:
>
> > 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.
>
> My suggestion on this is to rename the flag too, as ignore_nice_load (or
> ignore_nice_tasks, choose your way). Don't forget to do it in docs too.
>
'ignore_nice_tasks' gets my vote..

> So userspace tools will error out rather than do the reverse of what they were
> doing, and the user will fix the thing according to the (new) docs.
>
> This is the way we avoid problems in kernel code, when changing APIs (I read
> Linus talking about this), so I assume it's ok?
>
Makes a lot of sense. I'll roll out some new patches this evening and submit
them.

Regards

Alex

> --
> 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

--
________________________________________
< An idle mind is worth two in the bush. >
----------------------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||


Attachments:
(No filename) (1.57 kB)
signature.asc (189.00 B)
Digital signature
Download all attachments

2005-09-30 15:52:51

by Stefan Seyfried

[permalink] [raw]
Subject: Re: [patch 1/1] cpufreq_conservative: invert meaning of 'ignore_nice'

Dave Jones wrote:
> On Thu, Sep 29, 2005 at 01:46:33PM +0200, Blaisorblade wrote:

> > So userspace tools will error out rather than do the reverse of what they were
> > doing, and the user will fix the thing according to the (new) docs.
>
> Agreed. If we change this, we change it completely.
> Stefan already mentioned his app will break, and we typically don't
> find out about widespread breakage until after we ship a release.

I can live with the change - powersaved has a setting "consider_nice" to
configure this and i can put out a support article telling people to
"invert" this setting if they are running custom kernels, so it is not
really a showstopper for me. Most of the users don't understand thos
settings anyway ;-)

I'm not sure what is better for me - a nice short name or a clear
indication on which version we are running ;-)
--
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