Thread (5 messages) 5 messages, 3 authors, 2012-11-29

Re: [PATCH 22/25] Generic dynamic per cpu refcounting

From: Kent Overstreet <hidden>
Date: 2012-11-29 20:59:24
Also in: lkml

On Thu, Nov 29, 2012 at 09:54:47PM +0100, Andi Kleen wrote:
quoted
quoted
The regular atomic_t is limited in ways that you are not.
See my original mail.
I don't follow, can you explain?
For most cases the reference count is tied to some object, which are
naturally limited by memory size or other physical resources.

But in the assymetric CPU case with your ref count no such limiter
exists.
It's got exactly the same limit as the old code which used the atomic_t
- we're limited by the number of threads that can be issuing aio
syscalls at a time.

The assymetry you're talking about _doesn't matter_, individual cpu
counters wrapping does not affect what the counters all sum to when we
go to tear down.

A coworker at lunch actually pointed out to me that the reason this is
true is just that modular arithmatic is still associative with addition
and subtraction.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help