Re: [patch v5 06/15] sched: log the cpu utilization at rq

Alex Shi
2013-02-20T12:39:28Z

On 02/20/2013 08:19 PM, Preeti U Murthy wrote:
> Hi everyone,
>
> On 02/18/2013 10:37 AM, Alex Shi wrote:
>> The cpu's utilization is to measure how busy is the cpu.
>> util = cpu_rq(cpu)->avg.runnable_avg_sum
>> / cpu_rq(cpu)->avg.runnable_avg_period;
>
> Why not cfs_rq->runnable_load_avg? I am concerned with what is the right
> metric to use here.

Here we care the utilization of the cpu not the load avg. load avg maybe
quit bigger on a heavy task(with a big load weight), but maybe it just
used 20% of cpu time, while a light task with 100% cpu usage maybe still
has smaller load avg.

For power consideration, above light task with 100% usage need to take a
cpu, while another heavy task can packing into one cpu with other tasks.

> Refer to this discussion:https://lkml.org/lkml/2012/10/29/448
>
> Regards
> Preeti U Murthy
>

--
Thanks
Alex