link: milestone-overclock
UPDATE: Hmm, it looks like the the stats are still broken in Tiago's version. I will look at the his sources and try to find what's wrong. Till that time, better use the module version that is attached here.
UPDATE 27 August, 2010: the patch has been incorporated in the new 1.4 version of the milestone-overclock module by tiagosousa, therefore this modified version is no longer needed.
This patch fixes two issues of the original overclock module (v1.2):
1. broken CPUfreq statistics
2. freq_table_addr and mpu_opps_addr not set by echo to /proc/overclock/omap2_clk_init_cpufreq_table_addr (Issue 30)
1. CPUfreq statistics:
The frequencies in the cpufreq stats table are not updated by the original overclock.ko module.
Therefore when the cpu_freq table is changed, e.g. cat /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state does not provide any useful information anymore - it still contains the original frequencies.
The patch adds /proc/overclock/cpufreq_stats_update_addr entry that can be used to autodetect the correct cpufreq stats address.
You can use busybox grep cpufreq_stats_update /proc/kallsyms to find the cpufreq_stats_update address.
Then use echo 0xc029d9d4 > /proc/overclock/cpufreq_stats_update_addr (replace 0xc029d9d4 with the found value).
The default cpufreq stats address used by the patched module comes from the kernel from the 2.1 Canadian Telus firmware. If you are using another kernel, you have to set the cpufreq_stats_update_addr as described above.
2. Handling of writes to /proc/overclock/omap2_clk_init_cpufreq_table_addr:
Fixed missing assignments to freq_table_addr and mpu_opps_addr after autodetection of addresses when handling writes to /proc/overclock/omap2_clk_init_cpufreq_table_addr (Issue 30 of the original overclock module).
E.g. for 2.34.3/2.36.0 firmware you can now use:
echo 0xc0295704 > /proc/overclock/cpufreq_stats_update_addr
echo 0xc004e4b0 > /proc/overclock/omap2_clk_init_cpufreq_table_addr
It will correctly set all three needed addresses (stats_addr, freq_table_addr and mpu_opps_addr).
The correct values for any kernel can be found by:
busybox grep cpufreq_stats_update /proc/kallsyms
and
busybox grep omap2_clk_init_cpufreq_table /proc/kallsyms
An example of the output of cat /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state for a 1000000/750000/500000/250000 freq table:
Unpatched overclock.ko
550000 5108
500000 10287
250000 100373
125000 0
overclock_stats.ko
1000000 12092
750000 3435
500000 11563
250000 101553
Comments
same here
as payce said.
I use insmod overclock.ko in mot_boot.
By echo cpufreq_stats_update_addr after insmod, overclock.ko 1.4 works 'better' as time_in_state shows:
800000 xxx
500000 xxx
250000 xxx
125000 xxx
instead of 'pure' stock freq,
while using your patched version the output is:
800000 xxx
600000 xxx
500000 xxx
250000 xxx
CPUfreq fix in new overclock.ko App does not work yet...
Hey nadlabak!
It's payce from Android-Hilfe.de. It seems as the patch Tiago incooperated does not work quite yet. See this issue I opened up: https://code.google.com/p/milestone-overclock/issues/detail?id=41
Did he perhaps use an old version of the patch? (echo xyz_adress > cpufreq_stats_update_addr does not work)
BR!
compiled?
Hi nadlabak,
Any chance you can provide the patched binary (compiled) file? i.e. ready to use
I'm not into programming, but would like to use your fix.
Thanks in advance and keep up your excellent work!
Binary
It's the attached file overclock_stats.ko. That's the compiled patched overclock module, ready to be used.
Now I feel
embarrassed... (not to say stupid).
Sorry about that and thanks!
How to install?
Sorry, I am noob and literally took hours to install the regular overclock + conservative preset.
how do I install this?
At the moment when I do "cat /proc/overclock/mpu_opps" in a terminal it gives me wrong frequencies, I guess this patch will fix this?
Droid/Milestone 2.1BUG - major 2D slowdown
Hi
Are you aware of this bug? http://code.google.com/p/android/issues/detail?id=7520
Probably it has something to do with "dynamic overclocking on demand" on 2.1 Droid/Milestone and can be fixed with just tweaking of some kernel structures without waiting for 2.2 where it's probably fixed (can't tell for sure until the official 2.2 goes OTA - see the link above)
In current state, 2.1 Droid/Milestone can only render 2D graphics no faster than a lousy 30FPS - that's very frustrating for game developers and users who want to play games.
5 line number?
what's the signification of the single number that appears at the last line of the stats update table?
thx
sorry. soled, is the number
sorry.
soled, is the number of transitions
.
hi, when i triyng your
hi,
when i triyng your patched module in my 02.34.3 milestone
the phone stucks at Motorola "M" logo,
even if i not initialize the cpufreq_stats_update_addr.
i have searched for the stats addr using the grep command and obtained
>>> c0295704 t cpufreq_stats_update
i have updated the module at /system/lib/modules/ and the
mot_boot_mode with the code bellow:
insmod /system/lib/modules/cpufreq_overclock.ko
# Set the CPU frequencies tables addresses
echo 0xc04f7b68 > /proc/overclock/freq_table_addr
echo 0xc04f8888 > /proc/overclock/mpu_opps_addr
echo 0xc0295704 > /proc/overclock/cpufreq_stats_update_addr
...
with the overclock12.ko (original) all works fine
(initializating the freq_table and mpu_opps addresses with their
correct values)
please help !
2.34.3
You definitely must set the /proc/overclock/cpufreq_stats_update_addr when running the kernel from 2.34.3 or the module will use a wrong address.
I'll flash the 2.34.3 on my phone and try to find out what's wrong.
i agree to you very
i agree to you very mutch!!
for your info, i send the freqs table and mpu_oops table addresses:
echo 0xc04f7b68 > /proc/overclock/freq_table_addr
echo 0xc04f8888 > /proc/overclock/mpu_opps_addr
T H A N K ' S !
I've identified the problem
I've identified the problem and I'll upload a new version soon.
Until then, you can use this parameter when loading the module (instead of echo 0xc0295704 > /proc/overclock/cpufreq_stats_update_addr), it works perfectly:
insmod /system/lib/modules/overclock_stats.ko cpufreq_stats_update_addr=0xc0295704no problem. i wait for a new
no problem.
i wait for a new version :)
thank's
Fixed version uploaded.
Fixed version uploaded. You can re-download the overclock_stats.ko.
works
thank you!!
sorry, the numbers right to
sorry,
the numbers right to the frequencies are the number of ticks
thatthe processor was clocked at that frequency, or am I totally confused?
thank's for our great work!
It's the time that the
It's the time that the processor was clocked at that frequency (in 10ms units).