Re: [PATCH 23/26] Generic dynamic per cpu refcounting

2012-12-27 Thread Fubo Chen
On Mon, Dec 3, 2012 at 9:58 PM, Kent Overstreet wrote: > +#define pr_fmt(fmt) "%s: " fmt "\n", __func__ Dynamic debug already allows to insert the function name. Please consider leaving this line out entirely and move the "\n" to the end of individual printed lines. > +#define PCPU_REF_PTR

[PATCH 23/26] Generic dynamic per cpu refcounting

2012-12-03 Thread Kent Overstreet
This implements a refcount with similar semantics to atomic_get()/atomic_dec_and_test(), that starts out as just an atomic_t but dynamically switches to per cpu refcounting when the rate of gets/puts becomes too high. It also implements two stage shutdown, as we need it to tear down the percpu cou