All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bug 8081] Conservative governor sets wrong and too high sampling rates
@ 2007-02-25 16:37 bugme-daemon
  2007-02-25 20:29 ` Rafał Bilski
  0 siblings, 1 reply; 15+ messages in thread
From: bugme-daemon @ 2007-02-25 16:37 UTC (permalink / raw)
  To: cpufreq

http://bugzilla.kernel.org/show_bug.cgi?id=8081





------- Additional Comments From ferriste@libero.it  2007-02-25 08:37 -------
Created an attachment (id=10530)
 --> (http://bugzilla.kernel.org/attachment.cgi?id=10530&action=view)
This is a simple patch to fix the bug. Apply it at conservative.c


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

^ permalink raw reply	[flat|nested] 15+ messages in thread
* Re: [Bug 8081] Conservative governor sets wrong and too high sampling rates
@ 2007-02-25 21:14 stefano ferri
  0 siblings, 0 replies; 15+ messages in thread
From: stefano ferri @ 2007-02-25 21:14 UTC (permalink / raw)
  To: rafalbilski; +Cc: cpufreq

Hi Rafal, I think you have not understood what is the core of the problem...
The problem is not to make possible to change sampling rates, anyone with the current code of the kernel can do it.
The problem is that conservative has a 10x factor of polling times if compared to ondemand.

>The CPUfreq governor "conservative", much like the "ondemand"
>governor, sets the CPU depending on the current usage. It differs in
>behavior in that it gracefully increases and decreases the CPU speed
>rather than jumping to max speed the moment there is any load on the
>CPU.

Right, but if ondemand has a minimum polling time of 99500 milliseconds, also conservative should have it, even if it "gracefully" increases and decreases the CPU speed. The policy of the transition of a governor is another thing. It is a kernel space governor and it should do the things gracefully but rapidly ;-)!

The problem is that line 497 in the conservative.c code.
I don't know if the problem depends on my specific hardware, but my system does not respond at all to a variable system load witout deleting that 10x factor, my cpu goes at 400 Mhz all the time, also transition to 800 Mhz are rare.

>NACK from me. Current values are working for me. If these values are
>not good for You then write patch to Kconfig which will allow user to
>change sampling rate during "make config". Later "make oldconfig" will
>preserve Your values.

I said, it's not that the problem. Users will NOT be able to set a decent polling time if that 10x factor wil not be removed. I can choose a minium time of 995000 millisecond (1 second!). Now that I recompiled I obtain a 99500 with both ondemand and conservative, as it should be.
And I see the frequency increasing and decreasing gracefully :-)!

Stefano




---------- Initial Header -----------

From      : "Rafal Bilski" rafalbilski@interia.pl
To          : ferriste@libero.it
Cc          : cpufreq@lists.linux.org.uk
Date      : Sun, 25 Feb 2007 21:29:59 +0100
Subject : Re: [Bug 8081] Conservative governor sets wrong and too high sampling rates







> > ------- Additional Comments From ferriste@libero.it  2007-02-25 08:37 -------
> > Created an attachment (id=10530)
> >  --> (http://bugzilla.kernel.org/attachment.cgi?id=10530&action=view)
> > This is a simple patch to fix the bug. Apply it at conservative.c
> NACK from me. Current values are working for me. If these values are
> not good for You then write patch to Kconfig which will allow user to
> change sampling rate during "make config". Later "make oldconfig" will 
> preserve Your values.
>
> Rafal
>
>
> ----------------------------------------------------------------------
> Przedluz domene.PL za 75 zl >> http://link.interia.pl/f1a19
>
> 


------------------------------------------------------
Passa a Infostrada. ADSL e Telefono senza limiti e senza canone Telecom
http://click.libero.it/infostrada25feb07


^ permalink raw reply	[flat|nested] 15+ messages in thread
* Re: [Bug 8081] Conservative governor sets wrong and too high sampling rates
@ 2007-02-25 21:24 stefano ferri
  2007-02-25 22:31 ` Rafał Bilski
  0 siblings, 1 reply; 15+ messages in thread
From: stefano ferri @ 2007-02-25 21:24 UTC (permalink / raw)
  To: rafalbilski; +Cc: cpufreq

Hi Rafal, I think you have not understood what is the core of the problem...
The problem is not to make possible to change sampling rates, anyone with the current code of the kernel can do it.
The problem is that conservative has a 10x factor of polling times if compared to ondemand.

>The CPUfreq governor "conservative", much like the "ondemand"
>governor, sets the CPU depending on the current usage. It differs in
>behavior in that it gracefully increases and decreases the CPU speed
>rather than jumping to max speed the moment there is any load on the
>CPU.

Right, but if ondemand has a minimum polling time of 99500 milliseconds, also conservative should have it, even if it "gracefully" increases and decreases the CPU speed. The policy of the transition of a governor is another thing. It is a kernel space governor and it should do the things gracefully but rapidly ;-)!

The problem is that line 497 in the conservative.c code.
I don't know if the problem depends on my specific hardware, but my system does not respond at all to a variable system load witout deleting that 10x factor, my cpu goes at 400 Mhz all the time, also transition to 800 Mhz are rare.

>NACK from me. Current values are working for me. If these values are
>not good for You then write patch to Kconfig which will allow user to
>change sampling rate during "make config". Later "make oldconfig" will
>preserve Your values.

I said, it's not that the problem. Users will NOT be able to set a decent polling time if that 10x factor wil not be removed. I can choose a minium time of 995000 millisecond (1 second!). Now that I recompiled I obtain a 99500 with both ondemand and conservative, as it should be.
And I see the frequency increasing and decreasing gracefully :-)!

Stefano




---------- Initial Header -----------

From      : "Rafal Bilski" rafalbilski@interia.pl
To          : ferriste@libero.it
Cc          : cpufreq@lists.linux.org.uk
Date      : Sun, 25 Feb 2007 21:29:59 +0100
Subject : Re: [Bug 8081] Conservative governor sets wrong and too high sampling rates







> > ------- Additional Comments From ferriste@libero.it  2007-02-25 08:37 -------
> > Created an attachment (id=10530)
> >  --> (http://bugzilla.kernel.org/attachment.cgi?id=10530&action=view)
> > This is a simple patch to fix the bug. Apply it at conservative.c
> NACK from me. Current values are working for me. If these values are
> not good for You then write patch to Kconfig which will allow user to
> change sampling rate during "make config". Later "make oldconfig" will 
> preserve Your values.
>
> Rafal
>
>
> ----------------------------------------------------------------------
> Przedluz domene.PL za 75 zl >> http://link.interia.pl/f1a19
>
> 


------------------------------------------------------
Passa a Infostrada. ADSL e Telefono senza limiti e senza canone Telecom
http://click.libero.it/infostrada25feb07


^ permalink raw reply	[flat|nested] 15+ messages in thread
* Re: [Bug 8081] Conservative governor sets wrong and too high sampling rates
@ 2007-02-27 11:49 stefano ferri
  2007-02-27 19:27 ` Rafał Bilski
  0 siblings, 1 reply; 15+ messages in thread
From: stefano ferri @ 2007-02-27 11:49 UTC (permalink / raw)
  To: rafalbilski; +Cc: cpufreq

> > Hi Rafal
> Hi Stefano
> > I think you have not understood what is the core of the problem...
> Maybe. It is weekend and it is late and conservative works >for me.

I was speaking seriously :-| ... Also for me it is working but without the patch  not as I wanted ... But now that I've read the archives of this mailing list (sorry I didn't read before...)  I understand a little your point of view, even if I disagree on it. I'll tell you why.

Last year the code of conservative was different ad less similar to ondemand than now. With that code (I mean a 2.6.14.6) I had these values:

sampling_rate_min 9950000
sampling_rate_max 1360065408

min= 9.95 seconds, max 1360. Ok, here there were some problems.
I contacted Alexander Clouther for this problem, and after he sent me four patches, in pratice the same code that I see on the archive of March 22, 2006 of this mailing list. Sorry if I never read the archive, I read message here only fom yesterday... So, I read in the message "[patch 2/4 MKII] " this:

>By default its ten times less responsive.

Ok, so the 10x factor compared to ondemand is a choice of developers.
Now I understand that what I thought a bug is not a real bug but a different idea about the governor.
I think that a kernel space governor that doesn't make possible a user to set a sampling rate of less than a second is not useful, it is better powernowd+userspace...
A user should be free to choose, if a developer think that the ideal samplig rate is about 1 second, ok, set this a default value but let user free to set it to 0.1 seconds in example. I cannot do a echo on sampling_rate lower than the value contained in sampling_rate_min.
Correcting that line of code I mentioned above one can choose a value between 0.0995 seconds and 9.95. I don't know what should I do with a maximum of 99.5...

I hope we can agree a little on this... If you want the kernel   set a default value of 1 second ok, but let users free to set it to a vrey lower value decreasing the value contained in sampling_rate_min.
Another important question is this: I read that Athlon 64 cpus have a too high latency time to swith form the minimum to the maximum frequency, so the ondemand governor is not a good choice because latency. Why an athlon 64 user could not have a governor increasing rapidly step by step as conservative could do with convenient values of sampling rates? I have not a direct experience with such processor.


> I don't like word "rapidly" here. Ondemand is doing things rapidly and as
> result my CPU is near the max frequency most time. Fan is making noise :-(

fan starts very rarely also with my version of conservative, ondemand, yes, makes it start for too much time.
Why don't you try?


> Please clarify me this problem. If You have 100% constant load (eg. You
> are compiling Thunderbird) CPU speed is increasing or not? Or Your case is,
> for example, RTorrent with shedule which is using 100% CPU for 1s at 10s
> interval? Would You like to change CPU frequency for this 1s to higher 
> value?

If the load is constant (as you said, when compiling) conservative increases frequency, but it takes ten second to pass from 400 Mhz to 2133, it's too much... The governor works but I think it's not very useful for a desktop use if I am not free to set a sampling rate lower than a second...

> You are changing *default* value. If You don't like min value then change
> min value. I disagree with Your change because You are changing *powersaver*
> governor into step-by-step ondemand.

If you think, the default value can remain the same, 1 or 2 seconds as now, but I would have the opportunity to set it to 0.1 seconds for example, while my sampling_rate_min is 995000, it is not possible in this condition! A conservative governor with the possibility to choose a lower sampling rate could be useful. As you said, it would be a step-by-step ondemand.

Stefano



------------------------------------------------------
Passa a Infostrada. ADSL e Telefono senza limiti e senza canone Telecom
http://click.libero.it/infostrada27eb07


^ permalink raw reply	[flat|nested] 15+ messages in thread
* Re: [Bug 8081] Conservative governor sets wrong and too high sampling rates
@ 2007-02-28  8:33 stefano ferri
  2007-02-28 19:39 ` Rafał Bilski
  0 siblings, 1 reply; 15+ messages in thread
From: stefano ferri @ 2007-02-28  8:33 UTC (permalink / raw)
  To: rafalbilski; +Cc: cpufreq


> > I hope we can agree a little on this... If you want the kernel
> > set a default value of 1 second ok, but let users free to set it
> > to a vrey lower value decreasing the value contained in sampling_rate_min.
> I agree.

Ok :-)

> Current value is good for me.

Rafal, I believe that, but you should consider that for some people current values are not the best... With the new code you wrote the governor should satisfy more users. I'll try the patch as soon as possible.
So now, if I have a default sampling rate of 199000, the min will be 19900... good


> OK. Patch below is touching only min value. It is for 2.6.20. Is it sufficent?

Yes, if it will be a change in the next release of the kernel!

Thanks
Stefano








------------------------------------------------------
Passa a Infostrada. ADSL e Telefono senza limiti e senza canone Telecom
http://click.libero.it/infostrada28eb07


^ permalink raw reply	[flat|nested] 15+ messages in thread
* Re: [Bug 8081] Conservative governor sets wrong and too high sampling rates
@ 2007-02-28 13:34 stefano ferri
  0 siblings, 0 replies; 15+ messages in thread
From: stefano ferri @ 2007-02-28 13:34 UTC (permalink / raw)
  To: rafalbilski; +Cc: cpufreq

> So now, if I have a default sampling rate of 199000, the min will be 19900... good

Oops.. wrong calculus. With the original code of the kernel default is 1990000, min with your patch will be 1/10, so 199000. Could you please align the min values with that of ondemand? (for my processor is 99500). It should be 1/20 of the default, and the min sampling rate that one can set would be about 1/10 of second.

Thanks
Stefano



------------------------------------------------------
Passa a Infostrada. ADSL e Telefono senza limiti e senza canone Telecom
http://click.libero.it/infostrada28eb07


^ permalink raw reply	[flat|nested] 15+ messages in thread
[parent not found: <bug-8081-3570@http.bugzilla.kernel.org/>]

end of thread, other threads:[~2007-08-18  8:21 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-25 16:37 [Bug 8081] Conservative governor sets wrong and too high sampling rates bugme-daemon
2007-02-25 20:29 ` Rafał Bilski
  -- strict thread matches above, loose matches on Subject: below --
2007-02-25 21:14 stefano ferri
2007-02-25 21:24 stefano ferri
2007-02-25 22:31 ` Rafał Bilski
2007-02-27 11:49 stefano ferri
2007-02-27 19:27 ` Rafał Bilski
2007-02-28  8:33 stefano ferri
2007-02-28 19:39 ` Rafał Bilski
2007-03-01 19:57   ` Alexander Clouter
2007-02-28 13:34 stefano ferri
     [not found] <bug-8081-3570@http.bugzilla.kernel.org/>
2007-06-21  0:04 ` bugme-daemon
2007-06-21  0:12 ` bugme-daemon
2007-08-17 22:41 ` bugme-daemon
2007-08-18  8:21 ` bugme-daemon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.