Hi,
I wanted to know if the ondemand governor scales down the frequency to a minimum when the load comes below up_threshold?
I understand that
1) Every now and then, the governor work queue runs and checks for "load" in percentage.
If load > 95 ; it bumps the frequency to maximum;
ie. if the idle time is less than 5% ; the cpu will run at maximum
2) If load < 90% ; it bumps the frequency down little bit;
It continues to do this till minimum; So the rate of decrease of frequency to minimum is very slow;
So, the frequency decrease to minimum will take a long time to reach minimum (depends on sampling time).
Is this correct.
/Ryan
i did not quite understand the down differential part. Can any one explain it. What role it plays while scaling down. because if the load is less than (upthresold - down_differential) it scales down everytime the sample duration. this is what i understood.
thank you.
/Ryan
On Thu, Sep 26, 2013 at 7:51 PM, Ryan ryanphilips19@googlemail.com wrote:
Hi,
I wanted to know if the ondemand governor scales down the frequency to a minimum when the load comes below up_threshold?
I understand that
- Every now and then, the governor work queue runs and checks for
"load" in percentage.
If load > 95 ; it bumps the frequency to maximum; ie. if the idle time is less than 5% ; the cpu will run at maximum
If load < 90% ; it bumps the frequency down little bit;
It continues to do this till minimum; So the rate of decrease of
frequency to minimum is very slow;
So, the frequency decrease to minimum will take a long time to reach minimum (depends on sampling time).
Is this correct.
/Ryan
On 26-Sep-2013 8:50 PM, "Ryan" ryanphilips19@googlemail.com wrote:
i did not quite understand the down differential part. Can any one
explain it.
What role it plays while scaling down. because if the load is less than (upthresold - down_differential) it scales down everytime the sample duration. this is what i understood.
thank you.
It is to avoid ping pong of freq.. so we decrease freq when we r sure that freq isn't going above upthresh due to minor correction of load in near future..
Can you explain a little bit, I read somewhere that it is due to ping pong. but i was not able to visualize that part. How it could happen.
also when you say that
"Latest ondemand gov keeps freq proportional to load all the time.. and switches to max freq directly if load is over 95" you mean to say there is no down differential part of 5%?
That is every sampling interval - If the load does not change by 5% - it tries to check of threshold - 5% every sampling period. and lowers it every sampling period.
thanks, /Ryan
On Thu, Sep 26, 2013 at 9:13 PM, Viresh Kumar viresh.kumar@linaro.org wrote:
On 26-Sep-2013 8:50 PM, "Ryan" ryanphilips19@googlemail.com wrote:
i did not quite understand the down differential part. Can any one explain it. What role it plays while scaling down. because if the load is less than (upthresold - down_differential) it scales down everytime the sample duration. this is what i understood.
thank you.
It is to avoid ping pong of freq.. so we decrease freq when we r sure that freq isn't going above upthresh due to minor correction of load in near future..
On 26-Sep-2013 10:03 PM, "Ryan" ryanphilips19@googlemail.com wrote:
Can you explain a little bit, I read somewhere that it is due to ping pong. but i was not able to visualize that part. How it could happen.
Suppose load is changing between 90 and 99, then due to down diff we will keep running at max freq.. otherwise continuos switching will hqppen..
also when you say that
"Latest ondemand gov keeps freq proportional to load all the time.. and switches to max freq directly if load is over 95" you mean to say there is no down differential part of 5%?
Not that.. in earlier code we will not inc freq while load is less than up thresh.. but now if load is less than up thresh but greater than last load, we will inc freq by some amount.. and so we end up using middle freqs more now..
Hello,
On Thu, Sep 26, 2013 at 10:32 PM, Viresh Kumar viresh.kumar@linaro.org wrote:
On 26-Sep-2013 10:03 PM, "Ryan" ryanphilips19@googlemail.com wrote:
Can you explain a little bit, I read somewhere that it is due to ping pong. but i was not able to visualize that part. How it could happen.
Suppose load is changing between 90 and 99, then due to down diff we will keep running at max freq.. otherwise continuos switching will hqppen..
Let me understand how the downscaling works in the older sources.
So, you mean that -
1) Upthreshold = 95% down dif = 5%
so, upthreshold - down diff = 90%
if load is 85% ; cpu downscaling takes place if load is 75% ; cpu downscaling takes place and so on.
So everytime for sampling rate period - work queue checks and finds the load and downscaling takes place if less than 90%.
What i did not understand is how down diff will make the cpu remain in the same range for a longer period.
Am i missing something. could you please give a detailed answer as i struggling to understand this.
Thanks for your time.
/ryan
also when you say that
"Latest ondemand gov keeps freq proportional to load all the time.. and switches to max freq directly if load is over 95" you mean to say there is no down differential part of 5%?
Not that.. in earlier code we will not inc freq while load is less than up thresh.. but now if load is less than up thresh but greater than last load, we will inc freq by some amount.. and so we end up using middle freqs more now..
On 27-Sep-2013 1:55 AM, "Ryan" ryanphilips19@googlemail.com wrote:
Let me understand how the downscaling works in the older sources.
So, you mean that -
- Upthreshold = 95% down dif = 5%
so, upthreshold - down diff = 90%
if load is 85% ; cpu downscaling takes place if load is 75% ; cpu downscaling takes place and so on.
So everytime for sampling rate period - work queue checks and finds the load and downscaling takes place if less than 90%.
What i did not understand is how down diff will make the cpu remain in the same range for a longer period.
Am i missing something. could you please give a detailed answer as i struggling to understand this.
Thanks for your time.
Since my first mail, I have been travelling by an overnight bus and sending u mail by my phone. And it is still not that easy to type with a phone.
Suppose load is 96, we switch to max freq.. now load toggles between 90 and 100 for some time... i.e. it goes to 90, 91, 92...100... but not below 90..
Then we will not decrease and increase the freq again and again.. but keep running at highest freq..
Thanks, I understood it! Now, From the code, i understand that the only if the load goes beyond 95% - he scales up the frequency.
Now, If we assume the load to be 50% now and he is running at a X Frequency. Now, what if the load increases from 50% to 70% - Will he bump it up? Since it does not cross 95% up threshold?
Coming back to the load calculation - Load is computed periodically, But he considers the total wall time or up time right and total idle time from the beginning. It is not just during the "sampling period" duration.
Thanks for your time.
/Ryan
On Fri, Sep 27, 2013 at 4:02 AM, Viresh Kumar viresh.kumar@linaro.org wrote:
On 27-Sep-2013 1:55 AM, "Ryan" ryanphilips19@googlemail.com wrote:
Let me understand how the downscaling works in the older sources.
So, you mean that -
- Upthreshold = 95% down dif = 5%
so, upthreshold - down diff = 90%
if load is 85% ; cpu downscaling takes place if load is 75% ; cpu downscaling takes place and so on.
So everytime for sampling rate period - work queue checks and finds the load and downscaling takes place if less than 90%.
What i did not understand is how down diff will make the cpu remain in the same range for a longer period.
Am i missing something. could you please give a detailed answer as i struggling to understand this.
Thanks for your time.
Since my first mail, I have been travelling by an overnight bus and sending u mail by my phone. And it is still not that easy to type with a phone.
Suppose load is 96, we switch to max freq.. now load toggles between 90 and 100 for some time... i.e. it goes to 90, 91, 92...100... but not below 90..
Then we will not decrease and increase the freq again and again.. but keep running at highest freq..
On 28-Sep-2013 11:30 AM, "Ryan" ryanphilips19@googlemail.com wrote:
Thanks, I understood it! Now, From the code, i understand that the only if the load goes beyond 95% - he scales up the frequency.
Now, If we assume the load to be 50% now and he is running at a X
Frequency.
Now, what if the load increases from 50% to 70% - Will he bump it up? Since it does not cross 95% up threshold?
In the earlier code: yes.. it will inc only if we r above 95.. In the latest code we can inc freq any time..
Coming back to the load calculation - Load is computed periodically, But he considers the total wall time or up time right and total idle time from the beginning. It is not just during the "sampling period" duration.
No.. load is calculated between samples... only
Thanks for your time.
/Ryan
On Fri, Sep 27, 2013 at 4:02 AM, Viresh Kumar viresh.kumar@linaro.org
wrote:
On 27-Sep-2013 1:55 AM, "Ryan" ryanphilips19@googlemail.com wrote:
Let me understand how the downscaling works in the older sources.
So, you mean that -
- Upthreshold = 95% down dif = 5%
so, upthreshold - down diff = 90%
if load is 85% ; cpu downscaling takes place if load is 75% ; cpu downscaling takes place and so on.
So everytime for sampling rate period - work queue checks and finds the load and downscaling takes place if less than 90%.
What i did not understand is how down diff will make the cpu remain in the same range for a longer period.
Am i missing something. could you please give a detailed answer as i struggling to understand this.
Thanks for your time.
Since my first mail, I have been travelling by an overnight bus and
sending
u mail by my phone. And it is still not that easy to type with a phone.
Suppose load is 96, we switch to max freq.. now load toggles between 90
and
100 for some time... i.e. it goes to 90, 91, 92...100... but not below
90..
Then we will not decrease and increase the freq again and again.. but
keep
running at highest freq..
On 26-Sep-2013 7:52 PM, "Ryan" ryanphilips19@googlemail.com wrote:
Hi,
I wanted to know if the ondemand governor scales down the frequency to a minimum when the load comes below up_threshold?
I understand that
- Every now and then, the governor work queue runs and checks for
"load" in percentage.
If load > 95 ; it bumps the frequency to maximum; ie. if the idle time is less than 5% ; the cpu will run at maximum
If load < 90% ; it bumps the frequency down little bit;
It continues to do this till minimum; So the rate of decrease of
frequency to minimum is very slow;
So, the frequency decrease to minimum will take a long time to reach minimum (depends on sampling time).
Is this correct.
Latest ondemand gov keeps freq proportional to load all the time.. and switches to max freq directly if load is over 95..