Artem S. Tashkinov | 3 Mar 2005 06:26
Picon

CPUFreq problems with Sempron 3100+

Hi, Dave!

You seem not to have answered my previous e-mail. That's a pity. Here's the 
problem: I've just upgraded to 2.6.11 final release kernel and it keeps 
writing to the console:
----- cut -------
ignoring illegal change in lo freq table-2 to 0x2
powernow-k8: transition frequency failed
ignoring illegal change in lo freq table-2 to 0x2
powernow-k8: transition frequency failed
ignoring illegal change in lo freq table-2 to 0x2
powernow-k8: transition frequency failed
------ cut -------

I've got a K8NS Pro motherboard and Sempron 3100+ Socket 754 CPU. Please, help

And here's a piece of my rc.local file
------ cut -------
modprobe powernow-k8 >/dev/null 2>&1
modprobe cpufreq_ondemand >/dev/null 2>&1
echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor 
2>/dev/null
------ cut -------
--

-- 

With respect, Artem
#
# Automatically generated make config: don't edit
(Continue reading)

Rob Weryk | 4 Mar 2005 02:13
Picon

[PATCH] cpufreq: allow ondemand governor as default


Hi,

The patch below (against 2.6.11) allows the ondemand cpufreq
governor to be selected as the default.  If it's acceptable,
please apply.

(I'm not subscribed, so please cc me on replies, thanks.)

Signed-off-by: Rob Weryk <rjweryk <at> uwo.ca>

diff -ur linux-2.6.11/drivers/cpufreq/Kconfig robbie-2.6.11/drivers/cpufreq/Kconfig
--- linux-2.6.11/drivers/cpufreq/Kconfig	2005-03-02 14:08:42.000000000 -0500
+++ robbie-2.6.11/drivers/cpufreq/Kconfig	2005-03-02 14:29:28.000000000 -0500
 <at>  <at>  -69,6 +69,13  <at>  <at> 
 	  program shall be able to set the CPU dynamically without having
 	  to enable the userspace governor manually.

+config CPU_FREQ_DEFAULT_GOV_ONDEMAND
+	bool "ondemand"
+	select CPU_FREQ_GOV_ONDEMAND
+	help
+	  Use the CPUFreq governor 'ondemand' as default.  This dynamically
+	  adjusts the CPU frequency based on the CPU use.
+
 endchoice

 config CPU_FREQ_GOV_PERFORMANCE
diff -ur linux-2.6.11/include/linux/cpufreq.h robbie-2.6.11/include/linux/cpufreq.h
--- linux-2.6.11/include/linux/cpufreq.h	2005-03-02 14:08:47.000000000 -0500
(Continue reading)

red | 4 Mar 2005 13:00
Picon
Favicon

powernow-k8 problem

Hello list, 
i would like to ask if it`s workaround for powernow-k8 to be fuctional on AMD64 system with FSB >254Mhz. Any
value bigger than 254 causing powernow-k8 module to refuse load with message "No such device". Changing
only value FSB in bios to any value <=254 make powernow-k8 work fine again.
My board is abit av8 and CPU is AMD64 3000+.

Thanx for help

Rene Petro
Dominik Brodowski | 6 Mar 2005 18:06

Re: [PATCH] cpufreq: allow ondemand governor as default

Hi,

This is not possible yet -- unfortunately. If you set ondemand to be
"default" but it fails at initialization (it does so for several drivers!),
cpufreq enters an undefined state.

Thanks,
	Dominik

On Thu, Mar 03, 2005 at 08:13:59PM -0500, Rob Weryk wrote:
> 
> Hi,
> 
> The patch below (against 2.6.11) allows the ondemand cpufreq
> governor to be selected as the default.  If it's acceptable,
> please apply.
> 
> (I'm not subscribed, so please cc me on replies, thanks.)
> 
> Signed-off-by: Rob Weryk <rjweryk <at> uwo.ca>
> 
> 
> diff -ur linux-2.6.11/drivers/cpufreq/Kconfig robbie-2.6.11/drivers/cpufreq/Kconfig
> --- linux-2.6.11/drivers/cpufreq/Kconfig	2005-03-02 14:08:42.000000000 -0500
> +++ robbie-2.6.11/drivers/cpufreq/Kconfig	2005-03-02 14:29:28.000000000 -0500
>  <at>  <at>  -69,6 +69,13  <at>  <at> 
>  	  program shall be able to set the CPU dynamically without having
>  	  to enable the userspace governor manually.
>  
> +config CPU_FREQ_DEFAULT_GOV_ONDEMAND
(Continue reading)

Eric Piel | 6 Mar 2005 18:06
Favicon

[PATCH] transition latency of speedstep-ich

Dominik Brodowski a écrit :
> On Sun, Feb 06, 2005 at 11:33:49PM +0100, Eric Piel wrote:
:
>>This patch proposes to consider a CPUFREQ_ETERNAL latency as the maximum 
>>possible latency of the governor (10 ms). I think this should be 
>>conservative enough to be safe with any driver.
>  
> No. CPUFREQ_ETERNAL is there to assert no dynamic frequency governor runs
> with this driver. If a driver is safe to run on dynamic frequency governors
> like ondemand, fix the latency value instead.
> 
OK, so here is a patch for vanilla 2.6.11 to set the transition latency 
of speedstep-ich (the only driver which I can test in addtion to 
p4-clockmod). Actually it was quite hard to find, the intel manual 
(29834006.pdf) doesn't assert this latency clearly. From what I 
understood the frequency transition could take up to about 40µs (p.44) 
while the voltage transition could take up to 100µs (p.22 and p.58). So 
I put 100µs as the transition latency of this driver.

I've tried it on my computer, it works, and the ondemand governor can 
now support my hardware!

Hope you like it,
Eric

--
Set the transition latency of speedstep-ich to 100µs as described in 
intel's manual.

Signed-off-by: Eric Piel <eric.piel <at> tremplin-utc.net>
(Continue reading)

Eric Piel | 6 Mar 2005 19:41
Favicon

[PATCH][1/2] ondemand governor cleanup

Hello,

Here is a cleanup patch for the ondemand governor (as found in 2.6.11). 
In dbs_check_cpu(), first the idle ticks of the current CPU are measured 
and then the idle ticks of all the associated CPUs. This patch 
factorises the code: all the idle ticks are measured in the same loop.

Note: this was tested only on a computer with one CPU, I don't own any 
hardware with several CPUs which stick to the same frequency.

Eric

--
Ondemand governor cleanup, it factorises the idle ticks measurement.

Signed-off-by: Eric Piel <eric.piel <at> tremplin-utc.net>
--
_______________________________________________
Cpufreq mailing list
Cpufreq <at> lists.linux.org.uk
http://lists.linux.org.uk/mailman/listinfo/cpufreq
Eric Piel | 6 Mar 2005 19:52
Favicon

[PATCH][2/2] ondemand governor store the idle ticks for all cpus

Hello,

While doing the previous cleanup I noticed that until now only the 
prev_cpu_idle_up of the current CPU would be stored to 
prev_cpu_idle_down. In case of several associated CPUs, all the 
measurement is based on looking every CPU statistic. Therefore it is 
necessary to also save the prev_cpu_idle_up of the other associated CPUs.

This patch fixes this by adding a small loop. As the previous patch, 
it's against 2.6.11 and only tested on a monoprocessor PC.

Eric

PS: I couldn't find any documentation concerning the implementation of 
several CPUs with a frequency attached, is there any reference?

--
Ondemand governor did not store prev_cpu_idle_up into prev_cpu_idle_down 
for other CPUs than the current CPU.

Signed-off-by: Eric Piel <eric.piel <at> tremplin-utc.net>
--
_______________________________________________
Cpufreq mailing list
Cpufreq <at> lists.linux.org.uk
http://lists.linux.org.uk/mailman/listinfo/cpufreq
(Continue reading)

Dave Jones | 6 Mar 2005 22:51
Picon
Favicon

Re: [PATCH] cpufreq: allow ondemand governor as default

On Sun, Mar 06, 2005 at 06:06:25PM +0100, Dominik Brodowski wrote:

 > This is not possible yet -- unfortunately. If you set ondemand to be
 > "default" but it fails at initialization (it does so for several drivers!),
 > cpufreq enters an undefined state

I knew there was a reason for declining this, but couldn't recall
what it was (hence I sent Rob to the list when he sent me the patch).

This has come up about 4-5 times now in the last month or two.
Maybe its worth adding a comment to the Kconfig to prevent a 6th time :-)

		Dave
Rob Weryk | 7 Mar 2005 00:02
Picon

Re: [PATCH] cpufreq: allow ondemand governor as default

On Sun, Mar 06, 2005 at 04:51:06PM -0500, Dave Jones wrote:
> On Sun, Mar 06, 2005 at 06:06:25PM +0100, Dominik Brodowski wrote:
> 
>  > This is not possible yet -- unfortunately. If you set ondemand to be
>  > "default" but it fails at initialization (it does so for several drivers!),
>  > cpufreq enters an undefined state
> 
> I knew there was a reason for declining this, but couldn't recall
> what it was (hence I sent Rob to the list when he sent me the patch).

Hi Dominik and Dave, thanks for letting me know.

> This has come up about 4-5 times now in the last month or two.
> Maybe its worth adding a comment to the Kconfig to prevent a 6th time :-)

How about the patch below?  I initially tried to add it as a help
item, but those don't show up (at least not in make menuconfig)

Signed-off-by: Rob Weryk <rjweryk <at> uwo.ca>

--- linux-2.6.11/drivers/cpufreq/Kconfig	2005-03-06 17:25:06.000000000 -0500
+++ robbie-2.6.11/drivers/cpufreq/Kconfig	2005-03-06 17:58:55.000000000 -0500
 <at>  <at>  -52,6 +52,10  <at>  <at> 
 	  This option sets which CPUFreq governor shall be loaded at
 	  startup. If in doubt, select 'performance'.

+# Note that it is not currently possible to set the other governors
+# as the default, since if they fail to initialise, cpufreq will be
+# left in an undefined state.
+
(Continue reading)

Eric Piel | 7 Mar 2005 00:36
Favicon

[PATCH][RFC] ondemand governor automatic downscaling

Hello,

Here is a new policy for the ondemand governor. The modification 
concerns the frequency downscaling. Instead of decreasing to a lower 
frequency when the CPU usage is under 20%, this new policy automatically 
scales to the optimal frequency. The optimal frequency being the lowest 
frequency which provides enough power to not trigger the upscaling policy.

An exemple: let's say you are watching a DVD, this takes 40% of the cpu 
usage when frequency is maximum. With the current governor, the 
frequency would be at the maximum, 1Ghz (because when you started the 
player, the cpu usage reached, briefly, 100%). With this new algorithm, 
the optimal frequency is computed. The goal is to have a usage of 70% 
(== 80% minus a delta). Therefore the optimal frequency is 571Mhz, from 
this request we get the closest hardware frequency which is on this 
computer 700Mhz. We've saved 300Mhz.

The beautifulness of this approach is that, in addition to have a 
frequency better fitting the CPU usage, the code is simpler than before 
and, cherry on the cake, there is no need for down_threshold anymore!

Ok, so as you've understood, I'm happy with this new algorithm. It works 
on my computer (speedstep-ich) and it should bring even more conveniency 
with hardware that supports more than 2 frequencies. Does anyone see any 
disavantage in this approach? Venkatesh, what do you think of 
incorporating this new algorithm in the ondemand governor?

Eric

PS: This applies on vanilla 2.6.11, after my two previous patches 
(Continue reading)


Gmane