2004-11-07 08:35:49

by Alexander Clouter

[permalink] [raw]
Subject: [PATCH] cpufreq_ondemand tweaks (round two)

Hi All,

After listening to all your points a couple of weeks back I found the time to
break up my patches to 'ondemand' into three smaller patches and my clean my
tweaks up a little. I also went ahead with the suggestion to create a
completely new governor ('conservative', better name suggestions welcome)
which has the major alteration so that the change in frequency is made
gradually in both directions; this, I feel, being much more suitable for
battery powered environments.

I also included the relevant cleanup code by Adrian Bunk ([2.6 patch] small
cpufreq cleanup 2004-10-30 7:22:46) into the conservative governor.

As a side note, Venkatesh might want to consider dropping the default
sampling rate an order of magnitude as on my laptop its constantly flicking
between min and max and is a bit too trigger happy whilst the cpu use at
around 5%; for me at least. Bruno Ducrot pointed out that the amd64's "do
have unacceptable latency between min and max freq transition, due to the
step-by-step requirements (200MHz IIRC)". For me its just a a cosmetic
annoyance in /proc/cpuinfo :)

Let me know what you think.

Regards

Alex

------------------------------------------
01_ignore-nice.diff
-------------------
Adds support so that you can choose to consider (default) or ignore 'nice'ed
processes.

02_check-rate-and-break-out.diff
--------------------------------
If it is decided that cpu needs to be sped up a notch but yet the cpu frequency
is already at max (or reduce speed but already at its lowest frequency) then we
break out without wasting cpu cycles and (possible?) latency issues attempting
to make changes that have no effect.

03_sys_freq_step.diff
---------------------
the step down frequency is now tweakable through /sys. It takes an unsigned int
between zero and (((max - min) * 100) / max), the percentage equal to the
difference between min and max. The advantage of this is that all the divisions
are moved out of the main loop when it comes to working out whas frequency in
khz the cpu should be lowered by.
------------------------------

--
________________________________________
/ Nullum magnum ingenium sine mixtura \
| dementiae fuit. |
| |
| [There is no great genius without some |
| touch of madness.] |
| |
\ -- Seneca /
----------------------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||


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