[Q] [Kernel dev] CPU frequency scaling overhead - XDA-University

Hi, I have a question that I hope some experienced kernel developers can help me with:
When a dynamic scaling CPU governor is used, will the number of defined CPU frequency steps in the kernel affects the performance of frequency scaling?
In other words, when a CPU scales from a low frequency to a high frequency, will a higher amount of intermediate frequency steps in between them slows down the ramping up of CPU frequency?

cleekee said:
Hi, I have a question that I hope some experienced kernel developers can help me with:
When a dynamic scaling CPU governor is used, will the number of defined CPU frequency steps in the kernel affects the performance of frequency scaling?
In other words, when a CPU scales from a low frequency to a high frequency, will a higher amount of intermediate frequency steps in between them slows down the ramping up of CPU frequency?
Click to expand...
Click to collapse
It depends on the governor pretty much... Some governors ramp up step-by-step. Some will take a big jump. You'd have to look at your governor to decide.

pulser_g2 said:
It depends on the governor pretty much... Some governors ramp up step-by-step. Some will take a big jump. You'd have to look at your governor to decide.
Click to expand...
Click to collapse
I see. Thank you!

Related

[Q] Which is the most recommended Governor

I'm using emanoN V4 with No-Frills, and since CM7.1 with SetCPU, I always used 'ondemand' as Governor.
But reading other posts on other devices forums about this, some people say SmartassV2 is the best...
So, as each device is different (specially by the ARM version and manufacturer), I decided to begin this conversation here, and listen to what people with the same device as me has to say about it.
So which Governor do you consider the best for SGM?
Im using cm7.2, setting at nofrilis Governor : SavagedZen io : sio and undervolt at cm setting, give more battery life.
Sory for bad english
Squadzone my idols
felipevsw said:
I'm using emanoN V4 with No-Frills, and since CM7.1 with SetCPU, I always used 'ondemand' as Governor.
But reading other posts on other devices forums about this, some people say SmartassV2 is the best...
So, as each device is different (specially by the ARM version and manufacturer), I decided to begin this conversation here, and listen to what people with the same device as me has to say about it.
So which Governor do you consider the best for SGM?
Click to expand...
Click to collapse
sio if u need less laggy n smooth
v-mix said:
sio if u need less laggy n smooth
Click to expand...
Click to collapse
Thanks for the reply, but as I can see on No-Frills, sio is th I/O Scheduler, that is already set. I'm asking here about the Governor.
Ondemand and set noop
Sent from my GT-S5570 using xda premium
on emanonV4 i use Smartassv2 nd i/o noop
I see that people are very divided between ondemand and SmartassV2.
Now with sio and noop as I/O Scheduler.
Anyone else would like to share?
i will say ondemand because cpu will be set at lowest frequency and when you need it it will set at higher frquency which will save your battery and if you want performance then no lag will be good
The principle of the ondemand governor I'd already figured out (and actually didn't like it, very rough).
I would like to hear more about the principle of the SmartassV2, whereas since this morning I'm using SmartassV2 + noop and I noticed my SGM way smoother than with ondemand + sio.
Now is wait and see if the battery is sucked more.
felipevsw said:
The principle of the ondemand governor I'd already figured out (and actually didn't like it, very rough).
I would like to hear more about the principle of the SmartassV2, whereas since this morning I'm using SmartassV2 + noop and I noticed my SGM way smoother than with ondemand + sio.
Now is wait and see if the battery is sucked more.
Click to expand...
Click to collapse
smartassV2 is a re-working of the original smartass governor, it allows for the CPU to scale through all frequencies from the lowest you set to the highest, based on the load occuring. Basically it scales CPU based on realtime needs of the system, saV2 supposedly incorporates some more agressive settings for screen off, and I believe quicker scaling than the original smartass.
dhlalit11 said:
smartassV2 is a re-working of the original smartass governor, it allows for the CPU to scale through all frequencies from the lowest you set to the highest, based on the load occuring. Basically it scales CPU based on realtime needs of the system, saV2 supposedly incorporates some more agressive settings for screen off, and I believe quicker scaling than the original smartass.
Click to expand...
Click to collapse
Thanks a lot, man! And now I think that I had made my choice:
Governor: SmartassV2
I/O Scheduler: noop
Highly recommended!

[Q] CPU & GPU governors?

Hey guys,
I know the HTC One has a few cpu governors like msm-dcvs, intellidemand, ondemand etc... and gpu governors like ondemand, simple and interactive... and I know there's a thread that explains each governor, but what are the differences between each governor in relation to the HTC One, and which would you recommend for a nice balance of battery and performance? and what are the limitations of each one? Thanks a bunch!
This is the thread you're talking for...
However, the difference is how the governor work.
And the chose of the governor depends about your use of the phone...
There is still no answer about GPU governors. Aswell as specific settings in every governor which can we set

overclocking

Is there any way to overclock this device's cpu or gpu or even change governors?
revery0 said:
Is there any way to overclock this device's cpu or gpu or even change governors?
Click to expand...
Click to collapse
I hope this will help you: http://forum.xda-developers.com/asc...7en-rom-v1-0-emui-2-3-4-4-2-23-10-14-t2916016
This rom has modified governors and does not gives you the ability to change anything or adjust the cpu speed...
revery0 said:
Is there any way to overclock this device's cpu or gpu or even change governors?
Click to expand...
Click to collapse
We don't have a kernel that supports overclocking or has different governors implemented, so that's a no...
GawDroid said:
We don't have a kernel that supports overclocking or has different governors implemented, so that's a no...
Click to expand...
Click to collapse
Actually we do.. the stock kernel allows to overclock ( optimum performance power plan )
revery0 said:
Actually we do.. the stock kernel allows to overclock ( optimum performance power plan )
Click to expand...
Click to collapse
AFAIK, the power plan modifies the cpu frequency stepping, but still it doesn't allow surpassing the maximum CPU frequency of 1795 MHz.
And the only governor in our kernel is a version of hotplug.
Here's how it works in my understanding:
Quote: The “hotplug” governor scales CPU frequency based on load, similar to “ondemand”. It scales up to the highest frequency when “up_threshold” is crossed and scales down one frequency at a time when “down_threshold” is crossed.
The powerplan can modify the up- and down- threshold steps (so the device can use max frequency sooner and stay on higher frequencies longer), but that doesn't affect max frequency at all.
Hi!
This scripts is not overclock, but change/lock clock speed.
You need root, and any Script runner app.
Ddr_gpu=lock max speed ddr and gpu
ddr_gpu_cpu=lock max speed ddr, gpu and cpu
ddr_gpu_cpu_4core=lock max speed ddr, gpu, cpu and lock 4 core cpu
ddr_gpu_cpu_core_4core_stock=revert all to stock.
This scripts not pernement, if you restart the phone, all settings revert back to stock.
Ps: please when you download this files, delete the .zip.
No-Frills CPU Control
This apk controls your CPU on device.
Sent from my HUAWEI P7-L07 using XDA Free mobile app
Ziółek said:
No-Frills CPU Control
This apk controls your CPU on device.
Click to expand...
Click to collapse
Won't allow overclocking max frequency either... Just increasing min freq, and decreasing max freq.
Pretty much useless on P7, since we only have 1 governor and 3 I/O schedulers to chose from.
GawDroid said:
Won't allow overclocking max frequency either... Just increasing min freq, and decreasing max freq.
Pretty much useless on P7, since we only have 1 governor and 3 I/O schedulers to chose from.
Click to expand...
Click to collapse
Where I wrote that this app allowed overclocking ? It control CPU min and max frequency but only in factory fixed range.
Ziółek said:
Where I wrote that this app allowed overclocking ? It control CPU min and max frequency but only in factory fixed range.
Click to expand...
Click to collapse
Easy, Ziółek You never said it did.
However, since No-Frills doesn't do any good in the terms of overclocking, why posting about it in the overclocking thread
Would you agree?
pozdro z Wro
GawDroid said:
Easy, Ziółek You never said it did.
However, since No-Frills doesn't do any good in the terms of overclocking, why posting about it in the overclocking thread
Would you agree?
pozdro z Wro
Click to expand...
Click to collapse
Agree I referred only to the post with scripts
pozdro z Wawy :good:
No-frills not work correctly on p7...can't lock max speed and 4cpu clock, and can't lock gpu and ddr clock...
But this scripts do.
Try and check with cooltool.

Best governor,sheduler etc

Hello guys..Now how we have a lot of new kernel, in yours opinion which is best setup for performance,battery in governor, sheduler ,min&max Cpu,Gpu etc for our MI3 ? For now I use interactive,noop ,min 300 MHz and max 1,2 MHz..Gpu max 462MHz.. And that's seems ok for me..and franco kernel by audahadi
Nightmare + tripndroid 1.2-1.5Ghz, gpu 330Mhz
pgqta said:
Nightmare + tripndroid 1.2-1.5Ghz, gpu 330Mhz
Click to expand...
Click to collapse
Min cpu frequency 1.2 Ghz?? Why?
are you into gaming?
This is my current setup on XenonHD with Stuxnet+ kernel
(with regard to stats posted HERE)
HEIS3NBERG said:
4 hours of SoT with 50% ? How did you do that ? I'm reaching the 4hours of SoT sometimes but with 0% of battery :crying:
What is the other saving stuff you talking plz ?
Click to expand...
Click to collapse
damnthomas said:
wt setting is best for batter besides cpu set to governor and uc uv skills by Dark Knight
Click to expand...
Click to collapse
(I'm going to go tab by tab in Kernel Adiutor)
CPU:
CPU Max Freq- 1497MHz
CPU Min Freq- 300MHz
CPU Governor- conservative
Multicore Power Saving- Aggressive
Sync Threshold- 1190Mhz
Input Boost Freq- 960MHz
CPU Voltage:
300MHz- 700mV
422MHz- 705mV
499MHz- 705mV
576MHz- 710mV
653MHz- 710mV
729MHz- 715mV
883MHz- 725mV
CPU Hotplug:
MPDecision- ON (Stuxnet has no other hotplugs yet, and disabling hotplugs allows you to manually control which cores are active by checking boxes in CPU tab. But I didn't want to permanently switch off some cores, as it would probably affect smoothness, so decided to let MPDecision take care of it)
That's about all the Power-saving changes I made. :good:
The Dork Knight Rises said:
This is my current setup on XenonHD with Stuxnet+ kernel
(with regard to stats posted HERE)
(I'm going to go tab by tab in Kernel Adiutor)
CPU:
CPU Max Freq- 1497MHz
CPU Min Freq- 300MHz
CPU Governor- conservative
Multicore Power Saving- Aggressive
Sync Threshold- 1190Mhz
Input Boost Freq- 960MHz
CPU Voltage:
300MHz- 700mV
422MHz- 705mV
499MHz- 705mV
576MHz- 710mV
653MHz- 710mV
729MHz- 715mV
883MHz- 725mV
CPU Hotplug:
MPDecision- ON (Stuxnet has no other hotplugs yet, and disabling hotplugs allows you to manually control which cores are active by checking boxes in CPU tab. But I didn't want to permanently switch off some cores, as it would probably affect smoothness, so decided to let MPDecision take care of it)
That's about all the Power-saving changes I made. :good:
Click to expand...
Click to collapse
Can you explain why have you set your Sync Threshold to 1190Mhz
shabtab said:
Can you explain why have you set your Sync Threshold to 1190Mhz
Click to expand...
Click to collapse
Actually I can't...cuz I have no idea!
If you read the original post I linked, my aim was to increase battery life, so I just reduced all clock speeds while maintaining the default order
MaxFreq>SyncThreshold>InputFreq>MinFreq
But it gave me awesome results (again, check the link in prev post) without causing any lags, and ppl were asking for my setup, so I shared it with you guys.
Hope it helps you too :good:
The Dork Knight Rises said:
This is my current setup on XenonHD with Stuxnet+ kernel
(with regard to stats posted HERE)
(I'm going to go tab by tab in Kernel Adiutor)
CPU:
CPU Max Freq- 1497MHz
CPU Min Freq- 300MHz
CPU Governor- conservative
Multicore Power Saving- Aggressive
Sync Threshold- 1190Mhz
Input Boost Freq- 960MHz
CPU Voltage:
300MHz- 700mV
422MHz- 705mV
499MHz- 705mV
576MHz- 710mV
653MHz- 710mV
729MHz- 715mV
883MHz- 725mV
CPU Hotplug:
MPDecision- ON (Stuxnet has no other hotplugs yet, and disabling hotplugs allows you to manually control which cores are active by checking boxes in CPU tab. But I didn't want to permanently switch off some cores, as it would probably affect smoothness, so decided to let MPDecision take care of it)
That's about all the Power-saving changes I made. :good:
Click to expand...
Click to collapse
Mine is quite same and with Stuxnet on RR ROM, 1 Hours SOT per 10%; quite impressive.
The Dork Knight Rises said:
Actually I can't...cuz I have no idea!
If you read the original post I linked, my aim was to increase battery life, so I just reduced all clock speeds while maintaining the default order
MaxFreq>SyncThreshold>InputFreq>MinFreq
But it gave me awesome results (again, check the link in prev post) without causing any lags, and ppl were asking for my setup, so I shared it with you guys.
Hope it helps you too :good:
Click to expand...
Click to collapse
okay let me explain then it used to increase the max cpu clock speed if needed, like if you've clocked your cpu at 1.5 and the cpu gets exhausted with 100% usage then the cpu will be increased to given SyncThreshold value for sometime to lower the pressure on cpu,, in simple words it should not be lower than the max cpu Freq. and preferably disabling it is a better option.. and btw your settings are just awesome phone is not over heating also and thanks.
shabtab said:
okay let me explain then it used to increase the max cpu clock speed if needed, like if you've clocked your cpu at 1.5 and the cpu gets exhausted with 100% usage then the cpu will be increased to given SyncThreshold value for sometime to lower the pressure on cpu,, in simple words it should not be lower than the max cpu Freq. and preferably disabling it is a better option.. and btw your settings are just awesome phone is not over heating also and thanks.
Click to expand...
Click to collapse
Ah that makes a lot of sense. Thanks.
EDIT: But then why was SyncThreshold less than Max by default?
EDIT2: Also, same thing's been done by this awesome guy @nicholaschum (Google searched 'CPU Sync Threshold' LOL):
http://forum.xda-developers.com/showpost.php?p=56974252&postcount=363
The Dork Knight Rises said:
Ah that makes a lot of sense. Thanks.
EDIT: But then why was SyncThreshold less than Max by default?
EDIT2: Also, same thing's been done by this awesome guy @nicholaschum (Google searched 'CPU Sync Threshold' LOL):
http://forum.xda-developers.com/showpost.php?p=56974252&postcount=363
Click to expand...
Click to collapse
I am also wondering why people are keeping it less than default it just makes no sense.
@Gnome You are a pro kernel dev, right? Can you please explain to us (noobs :laugh what is up with the SyncThreshold value and what exactly it does?
The Dork Knight Rises said:
This is my current setup on XenonHD with Stuxnet+ kernel
That's about all the Power-saving changes I made. :good:
Click to expand...
Click to collapse
Your guides are always that helpful. Hope to see more guides from you! Pressed the thanks button.
Which is the best kernel for you?
mipo007 said:
Which is the best kernel for you?
Click to expand...
Click to collapse
Kernel by Gnome :thumbup:
Sent from my MI 3W using XDA Free mobile app

HUGE RENDERING, FPS and SMOOTHNESS improvement on OOS.

I don't know if it works on OOS versions but it does, on the OB12. You need to be rooted to be doing this.
Lower the input boost to 1036 on the big and 556 on the small first. Now, change the governor of the big cluster to conservative and the small to ondemand or conservative , benefit!
To see the improvement in FPS, you need to go to developer options and switch on profile GPU rendering. For those who didn't understand this: lower the graph is, higher the fps. Hit thanks if helped
Where to change these settings?
Any kernel manager would do. I'd recommend kernel aduitor
chinmai560621 said:
Any kernel manager would do. I'd recommend kernel aduitor
Click to expand...
Click to collapse
Just change the option of GPU GOVERNER to simple_on demand one from the above mentioned app. It will work smooth.. works for me..:good:?
ashokspidy said:
Just change the option of GPU GOVERNER to simple_on demand one from the above mentioned app. It will work smooth.. works for me..:good:?
Click to expand...
Click to collapse
I'd recommend to leave it on msm-adreno.
What if I'm on RR 5.8.2 and ElementalX? I have ondemand governor option for little but don't have conservative for big cluster.
karliyo said:
What if I'm on RR 5.8.2 and ElementalX? I have ondemand governor option for little but don't have conservative for big cluster.
Click to expand...
Click to collapse
This is exclusive for OOS. In fact, the interactive is supposed to be better than the rest but it's not the case on OOS which is why I made this thread.
chinmai560621 said:
This is exclusive for OOS. In fact, the interactive is supposed to be better than the rest but it's not the case on OOS which is why I made this thread.
Click to expand...
Click to collapse
Oh alright. Little governor ondemand seems quite fine right now.
By the way, are both governors interactive by default?
karliyo said:
Oh alright. Little governor ondemand seems quite fine right now.
By the way, are both governors interactive by default?
Click to expand...
Click to collapse
Has to be. Unless you use blu_spark kernel. It uses blu_activ.
How do these changes affect the battery life?
chinmai560621 said:
Has to be. Unless you use blu_spark kernel. It uses blu_activ.
Click to expand...
Click to collapse
You mean interactive and not blu_active?
I do recommend you guys taking a look at AKT.. There are alot of peformance oriented and balanced profiles that are already better with smoothness then stock.. Also Franco has some magic with stock settings!
chinmai560621 said:
I don't know if it works on OOS versions but it does, on the OB12. You need to be rooted to be doing this.
Lower the input boost to 1036 on the big and 556 on the small first. Now, change the governor of the big cluster to conservative and the small to ondemand or conservative , benefit!
To see the improvement in FPS, you need to go to developer options and switch on profile GPU rendering. For those who didn't understand this: lower the graph is, higher the fps. Hit thanks if helped
Click to expand...
Click to collapse
Hi friend, shall I change both values of big and small? I mean maximum and minimum?
Same, cant find where to change the input values for those two.
rOck4n said:
Same, cant find where to change the input values for those two.
Click to expand...
Click to collapse
You'll see input boost in the bottom section of CPU in kernel adiutor. Core 1- 1036, core 3 -556 is what you've to do. It'll be 1324 default on both. I'm suggesting that for slightly better battery life
MarcTremonti said:
How do these changes affect the battery life?
Click to expand...
Click to collapse
Lower SOTs are obvious, but to what degree is what matters. As far as I see, it's not that much.
GUYS, I recommend not to use this anymore. Oneplus has a reason to not release the kernel with conservative on . This is because conservative is not optimized for battery while interactive is. If interactive weren't optimized for battery, it'd be better than conservative for sure. I get only 4 hr sot on conservative but 5.5 on interactive. Though this is not placebo, it has a negative impact on SOT .
When I change big cluster to conservative, those cores will always stay above 2 GHz, as shown in Kernel Adiutor.
chinmai560621 said:
GUYS, I recommend not to use this anymore. Oneplus has a reason to not release the kernel with conservative on . This is because conservative is not optimized for battery while interactive is. If interactive weren't optimized for battery, it'd be better than conservative for sure. I get only 4 hr sot on conservative but 5.5 on interactive. Though this is not placebo, it has a negative impact on SOT .
Click to expand...
Click to collapse
The thread is about more performance and you're discussing battery life....of course it will have a lower battery life, the question is are you happy when your quad-core phone stutters....
chinmai560621 said:
You'll see input boost in the bottom section of CPU in kernel adiutor. Core 1- 1036, core 3 -556 is what you've to do. It'll be 1324 default on both. I'm suggesting that for slightly better battery life
Click to expand...
Click to collapse
Got it, thank you. I did notice a slightly battery improvement after two cycles.
Little investigation..
chinmai560621 said:
GUYS, I recommend not to use this anymore. Oneplus has a reason to not release the kernel with conservative on . This is because conservative is not optimized for battery while interactive is. If interactive weren't optimized for battery, it'd be better than conservative for sure. I get only 4 hr sot on conservative but 5.5 on interactive. Though this is not placebo, it has a negative impact on SOT .
Click to expand...
Click to collapse
Good you realised that.. I did a little investigation on your tweak.. Apparently setting governor to conservative locks the frequency of big cluster to max possible, usually above 2 ghz and it will step down slowly ( by slow I mean really slow like 1-2 seconds). Thus causes you to have very less render times on gpu profile as shown in the xda portal post.. I opened up ex kernel manager and observed same freq in higher range.
After some time I just changed governor to interactive and changed minimum freq of big cluster to 2 ghz.. I observed the same render times as situation as time when conservative was set as governor...
So this tweak is nothing but type of placebo since ramping up freq can lead to faster processing
Edit.: Couple of people on xda portal have said the same.. I didn't check it..

Categories

Resources