Messages in this thread | | | Date | Wed, 5 Oct 2011 16:16:48 +0400 | From | Glauber Costa <> | Subject | Re: [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
| |