Yow! Thanks for the tutorial.
I have to appologize for a certain dense-ness about what threshold values mean: Of course, lower up threshold == go up sooner and higher down threshold == go down sooner. :wacko: <-- me
I found the code for the conservitive governor:
https://github.com/slayher/android_kernel_omap/blob/master/drivers/cpufreq/cpufreq_conservative.c
Basically, it computes "load" as the wall time minus the idle time, and checks the thresholds against this load.
The comments at the start of dbs_check_cpu (the function that performs the checks and calls for the change, if any) says that going up always goes to the max frequency, while going down is by steps. The code doesn't back this up, however, it appear both move by steps.
There is one other interesting wrinkle: The down check subtracts 10 from the downthreshold as specified--so if you say 50%, it'll actually use 40% as the limit.
And in the process of looking at the code, and writing this, I had an "aha!" moment, when your "why 50% down threshold isn't so bad" statement made sense: That basically during any intense activity we'll be well above that high down threshold; it's only when the CPU truly has some spare time (e.g, when it's drawn the screen for some "static" app and is waiting for the user to do something) that it'll ever drop below 50% long enough to be seen by the governor--but it'll see it as soon as possible with the higher threshold.
And yes, I do love the inner workings--especially when given something like a governor with a bunch of values I can change, with very little explanation of exactly what will happen when I do, and why I might want to chose certain values! About 30 years ago, I worked on a real time OS for a military processor, so I have some (ancient) background in this kinda stuff.
Interesting that they default to 80% up and 20% down. Seems not so conservative.
Thanks again!
LDog