Re: [PATCH 23/33] generic dynamic per cpu refcounting

2013-04-15 Thread Theodore Ts'o
On Fri, Apr 12, 2013 at 12:36:00PM -0700, Kent Overstreet wrote: > It would be nice if we had unsigned atomic types... but given that we > don't and I'm pretty sure overflow in atomic types happens all over the > place that part honestly seems fine to me... > > That said, I suppose a comment indic

Re: [PATCH 23/33] generic dynamic per cpu refcounting

2013-04-12 Thread Kent Overstreet
On Tue, Apr 02, 2013 at 12:27:38PM -0400, Theodore Ts'o wrote: > Reviewed-by: "Theodore Ts'o" > > > + v = atomic64_add_return(1 + (1ULL << PCPU_COUNT_BITS), > > + &ref->count); > > + > > + if (!(v >> PCPU_COUNT_BITS) && > > + REF

Re: [PATCH 23/33] generic dynamic per cpu refcounting

2013-04-02 Thread Theodore Ts'o
Reviewed-by: "Theodore Ts'o" > + v = atomic64_add_return(1 + (1ULL << PCPU_COUNT_BITS), > + &ref->count); > + > + if (!(v >> PCPU_COUNT_BITS) && > + REF_STATUS(pcpu_count) == PCPU_REF_NONE && alloc) > +