Messages in this thread | | | Date | Sat, 20 Sep 2014 01:26:38 -0400 | From | Tejun Heo <> | Subject | Re: [PATCH 2/3] percpu-refcount: implement percpu_ref_set_killed() |
| |
On Mon, Sep 08, 2014 at 11:12:21AM +0900, Tejun Heo wrote: > With the recent addition of percpu_ref_reinit(), percpu_ref now can be > used as a persistent switch which can be turned on and off repeatedly > where turning off maps to killing the ref and waiting for it to drain; > however, there currently isn't a way to initialize a percpu_ref in its > off (killed and drained) state, which can be inconvenient for certain > persistent switch use cases. > > This patch adds percpu_ref_set_killed() which forces the percpu_ref > into its killed and drained state. The caller is responsible for > ensuring that no one else is using the ref. This can be used to force > the percpu_ref into its off state after initialization. > > Signed-off-by: Tejun Heo <tj@kernel.org> > Cc: Kent Overstreet <kmo@daterainc.com>
This turned out to be too limited. Dropping this one.
Thanks.
-- tejun
| |