[ONE General] on&off:
Frequency Scaling Step Size Reduction

TL;DR - It might be a good idea to set the Scaling Step Size (e.g. ramp_up_step and ramp_down_step in Smartmax Governor) to 26500 or atleast 76800

I have been trying to achieve a Profile that is Neutral, i.e. Performs according to demand while conserving as much Power as possible, without limiting the hardware capabilities. To that end, it has been great going through the work of all the contributors here, and whatever I have learnt is because of you. Thank You All :cowboy:

But let's face it, multitasking is not optional, and the phone must be ready to face processing demands in situations that cannot be predicted. You might get a phone-call while you are navigating a map, playing a game, or photographing a motion scene, with some messages incoming and downloads happening over wifi. All or any of these might happen at any time, or simultaneously. It's unpredictable and dynamic, and having limited the capabilities of the phone, when you are in such a situation, can prove to be quite frustrating. Hence my predicament at most of the profiles here limiting the Max Frequency to counter power consumption and heating issues.

So, while playing around to un-limit the Max Frequency while keeping the Cores at possible minimums, I noticed that most of the Ramp Steps are set to be quite high (to achieve quicker transitions I guess) for my objective. I would prefer to go slow and steady, with smoother transitions, hovering around the current frequency until it gets necessary to go either up or down, then jumping to the next step and the next and so on. I am aware that there are other parameters that are helpful in achieving that, but a high ramp_step seems to counter all of those outright, since you are not giving the cpu a chance to go to the next step, but going two or three steps at a time instead.

The available frequency_scaling_steps on the device currently are:

268800 300000 345600 422400 499200 576000 652800 729600 806400 883200 960000 1036800 1113600 1190400 1267200 1344000 1420800 1497600 1574400 1651200 1728000 1958400 2265600 2342400 2419200 2457600 2572800 2726400 2880000

The difference between the steps are:

31200 45600 76800 76800 76800 76800 76800 76800 76800 76800 76800 76800 76800 76800 76800 76800 76800 76800 76800 76800 230400 307200 76800 76800 38400 115200 153600 153600

Notice 76800 is the most common step. As a factor of 76800, the difference between the steps are:

0.40625 0.59375 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 4 1 1 0.5 1.5 2 2

Since we don't want to skip any step, 0.4 being the lowest multiple of 76800 we could use, I chose 25600, which is 76800*0.33 or 76800/3. Thereby transitioning to the next step in 3 discrete jumps when the difference is 76800, which is, in most cases. Setting it down to atleast 76800 might be a more sensible option, rather than the prevalent defaults that is found in most profiles, so that the frequency will move to the next step in 1 jump in most cases, when the difference is 76800.

This should also help in getting to the frequencies with factors > 1 slower, and factors < 1 faster, which seems to be to our advantage, given the above distribution. Shouldn't this help with what the Tunables in most Governors are trying to do? For example, the 4 factor difference between 1958400 and 2265600 should naturally act as a barrier, as it will take 12 jumps of 25600 to reach.

The difference, visually presented, using Smartmax governor, can be seen in the screenshots attached. First is with ramp_up_step and ramp_down_step set to 200000. Second is with both set to 25600. Notice the large number of unused frequencies, and therefore skipped steps, in the first.

This is an ongoing experiment, trying out my thoughts and ideas on the matter. I may be completely wrong or unjustified or being foolish, but I thought it might prove to inspire some thought, if such a thought hasn't already been thought before. :) I would like to know the advantages and disadvantages and where I might be mistaken.

Thank you. :D