Re: [PATCH 9/9] percpu_ref: make INIT_ATOMIC and switch_to_atomic() sticky

2014-09-23 Thread Kent Overstreet
On Tue, Sep 23, 2014 at 01:55:18AM -0400, Tejun Heo wrote: > Currently, a percpu_ref which is initialized with > PERPCU_REF_INIT_ATOMIC or switched to atomic mode via > switch_to_atomic() automatically reverts to percpu mode on the first > percpu_ref_reinit(). This makes the atomic mode difficult

[PATCH 9/9] percpu_ref: make INIT_ATOMIC and switch_to_atomic() sticky

2014-09-22 Thread Tejun Heo
Currently, a percpu_ref which is initialized with PERPCU_REF_INIT_ATOMIC or switched to atomic mode via switch_to_atomic() automatically reverts to percpu mode on the first percpu_ref_reinit(). This makes the atomic mode difficult to use for cases where a percpu_ref is used as a persistent on/off