Re: [PATCH 08/10] provide a version of cpuacct statistics insidecpu cgroup

From: Glauber Costa
Date: Wed Oct 05 2011 - 08:17:27 EST

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.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at