Vincent, On 27 March 2015 at 23:37, Vincent Guittot vincent.guittot@linaro.org wrote:
On 27 March 2015 at 16:12, Xunlei Pang pang.xunlei@linaro.org wrote:
+static int get_cpu_usage(int cpu) +{
unsigned long usage = cpu_rq(cpu)->cfs.utilization_load_avg;
unsigned long capacity = capacity_orig_of(cpu);
if (usage >= SCHED_LOAD_SCALE)
return capacity;
Can "capacity" be greater than SCHED_LOAD_SCALE? Why use SCHED_LOAD_SCALE instead of "capacity" in this judgement?
Yes, SCHED_LOAD_SCALE is the default value but the capacity can be in the range [1536:512] for arm as an example
Right, I was confused between cpu capacity and arch_scale_freq_capacity() in "Patch 04" then. Thanks.
-Xunlei