Thread (8 messages) 8 messages, 2 authors, 2017-01-25

Re: Delayed acpi frequency governor call

From: Philipp Miedl <hidden>
Date: 2017-01-23 14:24:13

On 23.01.2017 11:11, Viresh Kumar wrote:
On 20-01-17, 16:27, Philipp Miedl wrote:
quoted
This is not my issue. The code I'm referring to can be found in
cpufreq_governor.c:
<-->
if (unlikely(wall_time > (2 * sampling_rate) &&
        j_cdbs->prev_load)) {
This only confirms that the CPU was idle for sometime.
I would say it only checks whether the elapsed time since the last 
governor call. My question is whether the call to the governor can be 
delayed for such a long time without the CPU going into idle? If it can 
be guaranteed that the governor call cannot be delayed without the CPU 
going to idle than it is true - otherwise not.
quoted
   load = j_cdbs->prev_load;

   /*
    * Perform a destructive copy, to ensure that we copy
    * the previous load only once, upon the first wake-up
    * from idle.
    */
   j_cdbs->prev_load = 0;
} else {
   load = 100 * (wall_time - idle_time) / wall_time;
   j_cdbs->prev_load = load;
}
<-->

How can it happen that "unlikely(wall_time > (2 * sampling_rate)" is true
although the CPU utilization was 5%?
I am not sure how your test works, etc. Maybe try to generate traces for your
CPUs to see if they are going into idle or not. Maybe you are having a hard time
because of SMP platform ?
Possible that I'm having problems with the platforms. Its a quadcore 
with 2 hyperthreads. I have two applications running, one should keep 
the CPU its pinned to busy at around 5% utilization by doing 
calculations. The second one is pinned to another core (its also another 
physical core) and records all the timing values etc. The rest of the 
CPUs are not utilzed by me and besides my stuff there is just a bare 
Linux running without GUI.
I checked the values I get from get_cpu_idle_time(), which gets its 
values from get_cpu_idle_time_us() (tick-sched.c) or if that is not 
possible assembles it from the cpustat, and the according to these the 
CPU is never idle longer than sampling_rate - so the if statement from 
above should never be true.

Do I interpret the values wrong or can it be that the call to the 
governor gets delayed by something else?

-- 
--------------------------------------------------------------------
|  Philipp Miedl                                                   |
|  PhD Student @ Computer Engineering and Networks Laboratory      |
|  ETH Zurich, ETZG76, Gloriastrasse 35, 8092 Zurich, Switzerland  |
|  mail: philipp.miedl@ee.tik.ethz.ch      phone: +41 44 632 70 61 |
--------------------------------------------------------------------
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help