Re: [PATCH v2 13/14] provide a version of cpuusage statistics insidecpu cgroup

From: Andrew Wagin
Date: Thu Nov 10 2011 - 03:59:39 EST


2011/11/9 Glauber Costa <glommer@xxxxxxxxxxxxx>:
> On 11/09/2011 12:18 PM, Andrew Wagin wrote:
>>
>> And look at cfs_rq->prev_sum_exec_runtime, probably it is not used too.
>> Usage of cfs_rq->sum_exec_runtime looks strange.
>
> No, it is not.
> se->sum_exec_runtime is a per-se measure. It follows the task group as it
> moves from rq to rq. cfs->rq->sum_exec_runtime (and it's rt counterpart) is
> a measurement of accumulated runtime of all tasks that ever passed through
> this rq.
>

1. cfs_rq->sum_exec_runtime and cfs_rq->exec_clock are same things.

I enabled sched_stat by default and execute following commands:
# cat /proc/sched_debug | grep exec_clock
.exec_clock : 2959.768408
.exec_clock : 2340.166419
# cat /cgroup/cpu.usage_percpu
2960772019 2341358764

2. Reseting of cpu.usage doesn't work for root cgroup.
[root@dhcp-10-30-20-19 ~]# echo 0 > /cgroup/cpu.usage
[root@dhcp-10-30-20-19 ~]# cat /cgroup/cpu.usage
6087490986

Probably for this reason cfs_rq->prev_sum_exec is unused.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/