lkml.org 
[lkml]   [2014]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2014-09-20 07:41    [W:0.062 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site