Re: [MM] Make mm counters per cpu instead of atomic V2

From: KAMEZAWA Hiroyuki
Date: Thu Nov 05 2009 - 23:11:33 EST


On Thu, 5 Nov 2009 10:36:06 -0500 (EST)
Christoph Lameter <cl@xxxxxxxxxxxxxxxxxxxx> wrote:
> +static inline unsigned long get_mm_rss(struct mm_struct *mm)
> +{
> + int cpu;
> + unsigned long r = 0;
> +
> + for_each_possible_cpu(cpu) {
> + struct mm_counter *c = per_cpu_ptr(mm->rss, cpu);
> +
> + r = c->file + c->anon;

r += c->file + c->anon;

Thanks,
-Kame

--
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/