Re: [patch V3] percpu_counter: scalability works

From: Eric Dumazet
Date: Tue May 17 2011 - 05:45:50 EST


Le mardi 17 mai 2011 Ã 11:11 +0200, Tejun Heo a Ãcrit :

> I'm completely fine with #1. I'm not that crazy but I don't really
> want to take #2 - that makes the whole _sum() interface almost
> pointless.

Hi Tejun

_sum() is a bit more precise than percpu_counter_read(), but to make it
really precise, we means we have to stop concurrent activities, and we
never did in previous/current implementation.

We could add this (as Shaohua and myself tried in various patches)
later, if needed, but nowhere in kernel we currently need that.

Even /proc/meminfo doesnt call _sum(&vm_committed_as) but the lazy
percpu_counter_read_positive() function...

Reammy _sum() gives a good approximation of the counter, more precise
because of the percpu s32 folding, but no guarantee of deviation.



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