On my system the file /sys/devices/system/cpu/cpufreq/ondemand/down_threshold doesn't exist while the file up_threshold does exist in the same directory. The problem is without this file the value of down_threshold seems to be automatically set to 10 so I'm not able to set up_threshold to a value lower than 11.
This happened a long time back for ondemand governor (it is still supported by conservative though). commit c29f1403098135bdef75b190a5037db514701031 Author: Dave Jones <davej@redhat.com> Date: Tue May 31 19:03:50 2005 -0700 [CPUFREQ] ondemand governor automatic downscaling [PATCH] [4/5] ondemand governor automatic downscaling Here is a change of policy for the ondemand governor. The modification concerns the frequency downscaling. Instead of decreasing to a lower frequency when the CPU usage is under 20%, this new policy automatically scales to the optimal frequency. The optimal frequency being the lowest frequency which provides enough power to not trigger the upscaling policy. Signed-off-by: Eric Piel <eric.piel@tremplin-utc.net> Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Dave Jones <davej@redhat.com> --- drivers/cpufreq/cpufreq_ondemand.c | 117 +++++++++++++++++++++++------------------------------------------------------------------------------------ 1 file changed, 25 insertions(+), 92 deletions(-)
This makes it dificult to get an early upscaling of the cpu frequency. I'm trying to achieve this at ~1% cpu usage. Would it be possible after this commit to allow up_threshold to be lower (for example 1 on my system)?
Hi, sworddragon2: This is not a bug but "a change of policy for the ondemand governor". So close this as invalid. Hi Viresh: Could you answer sworddragon2's question in the comment2?
(In reply to comment #2) > This makes it dificult to get an early upscaling of the cpu frequency. I'm > trying to achieve this at ~1% cpu usage. Would it be possible after this > commit > to allow up_threshold to be lower (for example 1 on my system)? I didn't get exactly what behavior you want. Can you elaborate it a bit?
> I didn't get exactly what behavior you want. Can you elaborate it a bit? My goal: As soon as an application reaches 1% of cpu usage the related cpu should scale its frequency to the maximum. if the application goes into idle (below 1% of cpu usage) it should scale the frequency to the minimum. With this behavior I would achieve a high energy saving without loosing any performance (see this report for more details: https://bugzilla.kernel.org/show_bug.cgi?id=54761). To achieve this behavior 2 steps are needed: 1. up_threshold needs a low value. Currently it is limited to 11 because down_threshold is internally set to 10. Ideally down_threshold would set itself to up_threshold - 1 if up_threshold < 11 and up_threshold > 1. 2. Currently up_threshold must be higher than down_threshold which would it make impossible to set up_threshold to 1. It should be possible to set both values to the same value. up_threshold triggers only if the cpu usage >= than up_threshold and down_threshold triggers only if the cpu usage < down_threshold. This way both values can have the same value without making any troubles (which would also allow a higher precision of the scaling). In practice: I would have an energy saving system because all the processes are commonly in idle (below 1% of cpu usage). So my cpu would stay at 800 MHz. But as soon as I'm staring an application (like a game) my cpu would scale to 2700 MHz. Is my suggestion technically possible or have I missed something?
Hi, sworddragon2: I think this is a special user case rather than a bug. You can put your opinion to cpufreq maillist and you will get more responses there.
Mainly it is an enhancement (while finding a related bug). But at least I can split out the bug to another report. But I don't get it: Why don't we let the user decide which values he wants for up_threshold and down_threshold? Why must me treat users like a child here? What would be the problem if the user can fully configure this? Please explain it to me why we are forbidding the user to use down_threshold < 10.