Re: cpufreq profiling timer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi
What make me confused is not the setting of CPUFreq.
It is the timer of CPUfreq governor which will invoke workload sample
function in period.
This timer is deferrable timer which will not be issued when NO_HZ is
enabled and the core is goting to long idle without any task running
at it.
I have a arm board with two cores. each one will have a cpufreq_policy
running at it. After boot up, the cores are all running at 800MHZ. At
this time, i switch the current cpufreq governor of the cores from
"userspace" to "ondemand". i can see that the sample function in CPU0
is running, and try to low down the frequncy of CPU0, while for CPU1,
the sample function is not called even once. So i checked the code,
and find that the timer for sampling is not issued at CPU1. The reason
is the timer is deferrable.
the task switching the governor at CPU1 will start "on-demand"
governor and set the timer to launch the sampling. Because the timer
is deferrable, and after the task is completed, there is no running
task in CPU1 now, and CPU1 will enter long idle. At this time it will
query the latest timer that will expire. In fact, the deferrable timer
is not considered. So the sampling of CPU1 will not start, and CPU1
will be 800MHZ for a long time even it is totaly idle.

2011/12/6 Niemi, David <dniemi@xxxxxxxxxxxx>:
> What sort of settings have you tried?  This sort of situation should be helped by going to a faster sampling interval, shouldn't it?  If you go to a fast sampling interval and use sampling_down_interval greater than 1, it will check infrequently when busy but frequently when idle.  This is good if you are trying to maximize performance.  But if you are trying to minimize power consumption on light loads, you want to go in the opposite direction, set sampling_down_interval to 1, and possibly use powersave_bias.
>
> DCN
>
> -----Original Message-----
> From: cpufreq-owner@xxxxxxxxxxxxxxx [mailto:cpufreq-owner@xxxxxxxxxxxxxxx] On Behalf Of chao xie
> Sent: Monday, December 05, 2011 8:28 PM
> To: cpufreq@xxxxxxxxxxxxxxx; davej@xxxxxxxxxx
> Subject: cpufreq profiling timer
>
> hi
> Current CPUFreq governor will use deferrable timer to get the workload
> profiling run. But i think simply use this kind of timer will have
> some issue when the CPU comes to long idle. At this point, the CPUFreq
> governor for examaple, on-demand will not change the frequency lower.
> There is example,
> CPU1:
> profiling start 1                         profiling start  2
> |------------------------------++++++++|+++++++--------------------------------------------|
> "+" means CPU is busy doing a task. "-" means CPU is in idle.
> So at "profiling start 2", it detect the CPU is busy, and will
> increase the CPU frequency, may be to highest one. then during the
> second period, the task is completed, and CPU has no task to run, so
> it will enter a long idle. At this point, the profiling timer set by
> CPU governor which is deferrable will not be considered by system. So
> the CPU frequency will maintain the highest one for a long time even
> this is no task running at the CPU.
> For UP mode, it is not obviously. Because the only CPU always has some
> task to running in period.
> For SMP mode. The CPU0 will have task in period, while for other CPUs,
> they will be in idle for a long. The issue takes place frequently.
> So anyone in the mailist can give some suggestions?
> --
> To unsubscribe from this list: send the line "unsubscribe cpufreq" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe cpufreq" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Devel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Forum]     [Linux SCSI]

  Powered by Linux