From: Kent Overstreet <koverstreet@google.com>
To: Tejun Heo <theo@redhat.com>
Cc: linux-kernel@vger.kernel.org,
Rusty Russell <rusty@rustcorp.com.au>,
Oleg Nesterov <oleg@redhat.com>,
Christoph Lameter <cl@linux-foundation.org>
Subject: Re: [PATCH 2/2] percpu-refcount: implement percpu_tryget() along with percpu_ref_kill_and_confirm()
Date: Thu, 13 Jun 2013 16:44:59 -0700 [thread overview]
Message-ID: <20130613234459.GE28664@moria.home.lan> (raw)
In-Reply-To: <20130612204627.GC15092@htj.dyndns.org>
On Wed, Jun 12, 2013 at 01:46:27PM -0700, Tejun Heo wrote:
> From de3c0749e2c1960afcc433fc5da136b85c8bd896 Mon Sep 17 00:00:00 2001
> From: Tejun Heo <tj@kernel.org>
> Date: Wed, 12 Jun 2013 13:37:42 -0700
>
> Implement percpu_tryget() which succeeds iff the refcount hasn't been
> killed yet. Because the refcnt is per-cpu, different CPUs may have
> different perceptions on when the counter has been killed and tryget()
> may continue to succeed for a while after percpu_ref_kill() returns.
>
> For use cases where it's necessary to know when all CPUs start to see
> the refcnt as dead, percpu_ref_kill_and_confirm() is added. The new
> function takes an extra argument @confirm_kill which is invoked when
> the refcnt is guaranteed to be viewed as killed on all CPUs.
>
> While this isn't the prettiest interface, it doesn't force synchronous
> wait and is much safer than requiring the caller to do its own
> call_rcu().
>
> Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Kent Overstreet <koverstreet@google.com>
next prev parent reply other threads:[~2013-06-13 23:44 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-12 20:45 [PATCH percpu/for-3.11 1/2] percpu-refcount: cosmetic updates Tejun Heo
2013-06-12 20:46 ` [PATCH 2/2] percpu-refcount: implement percpu_tryget() along with percpu_ref_kill_and_confirm() Tejun Heo
2013-06-12 21:08 ` Kent Overstreet
2013-06-12 21:17 ` Tejun Heo
2013-06-12 21:46 ` Kent Overstreet
2013-06-12 23:31 ` Tejun Heo
2013-06-12 23:34 ` Tejun Heo
2013-06-13 3:50 ` [PATCH v2 " Tejun Heo
2013-06-13 23:13 ` [PATCH " Kent Overstreet
2013-06-13 23:44 ` Kent Overstreet [this message]
2013-06-14 2:41 ` [PATCH v3 " Tejun Heo
2013-06-12 20:57 ` [PATCH percpu/for-3.11 1/2] percpu-refcount: cosmetic updates Kent Overstreet
2013-06-12 20:59 ` Tejun Heo
2013-06-13 3:48 ` Tejun Heo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130613234459.GE28664@moria.home.lan \
--to=koverstreet@google.com \
--cc=cl@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@redhat.com \
--cc=rusty@rustcorp.com.au \
--cc=theo@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox