Messages in this thread | | | Date | Tue, 17 May 2011 11:11:02 +0200 | From | Tejun Heo <> | Subject | Re: [patch V3] percpu_counter: scalability works |
| |
Hello, Eric, Shaohua.
On Tue, May 17, 2011 at 11:01:01AM +0200, Eric Dumazet wrote: > Just convince him that percpu_counter by itself cannot bring a max > deviation guarantee. No percpu_counter user cares at all. If they do, > then percpu_counter choice for their implementation is probably wrong. > > [ We dont provide yet a percpu_counter_add_return() function ]
I haven't gone through this thread yet but will do so later today, but let me clarify the whole deviation thing.
1. I don't care reasonable (can't think of a better word at the moment) level of deviation. Under high level of concurrency, the exact value isn't even well defined - nobody can tell operations happened in what order anyway.
2. But I _do_ object to _sum() has the possibility of deviating by multiples of @batch even with very low level of activity.
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. Also, I don't want to add big honking lglock to just avoid #2 unless it can be shown that the same effect can't be achieved in saner manner and I'm highly skeptical that would happen.
Thank you.
-- tejun
| |