Vincent,
On 27 March 2015 at 23:37, Vincent Guittot <[email protected]> wrote:
> On 27 March 2015 at 16:12, Xunlei Pang <[email protected]> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to