lkml.org 
[lkml]   [2011]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 08/10] provide a version of cpuacct statistics inside cpu cgroup
On 10/05/2011 01:10 PM, Peter Zijlstra wrote:
> On Sun, 2011-10-02 at 23:21 +0400, Glauber Costa wrote:
>> + for_each_online_cpu(cpu) {
>> + struct kernel_stat *kstat = per_cpu_ptr(tg->cpustat, cpu);
>> + val += kstat->cpustat[USER];
>> + val += kstat->cpustat[NICE];
>> + }
>
> by using online_cpu, you fail to sum whatever data was accrued on
> unplugged cpus, is that a problem?
>
>

Humm... I guess it is. We're effectively replacing a percpu_counter,
that should accumulate anything left in cpus that gets unplugged. I'll
have to change that.

Thanks


\
 
 \ /
  Last update: 2011-10-05 14:19    [W:0.075 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site