From: Tejun Heo <tj@kernel.org>
To: Kent Overstreet <koverstreet@google.com>
Cc: linux-kernel@vger.kernel.org, Zach Brown <zab@redhat.com>,
Felipe Balbi <balbi@ti.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Mark Fasheh <mfasheh@suse.com>, Joel Becker <jlbec@evilplan.org>,
Rusty Russell <rusty@rustcorp.com.au>,
Jens Axboe <axboe@kernel.dk>,
Asai Thambi S P <asamymuthupa@micron.com>,
Selvan Mani <smani@micron.com>,
Sam Bradshaw <sbradshaw@micron.com>,
Jeff Moyer <jmoyer@redhat.com>, Al Viro <viro@zeniv.linux.org.uk>,
Benjamin LaHaise <bcrl@kvack.org>,
Oleg Nesterov <oleg@redhat.com>,
Christoph Lameter <cl@linux-foundation.org>,
Ingo Molnar <mingo@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] Generic percpu refcounting
Date: Mon, 3 Jun 2013 15:39:31 -0700 [thread overview]
Message-ID: <20130603223931.GD29989@mtj.dyndns.org> (raw)
In-Reply-To: <1370039205-14071-1-git-send-email-koverstreet@google.com>
On Fri, May 31, 2013 at 03:26:45PM -0700, Kent Overstreet wrote:
> This implements a refcount with similar semantics to
> atomic_get()/atomic_dec_and_test() - but percpu.
>
> It also implements two stage shutdown, as we need it to tear down the
> percpu counts. Before dropping the initial refcount, you must call
> percpu_ref_kill(); this puts the refcount in "shutting down mode" and
> switches back to a single atomic refcount with the appropriate barriers
> (synchronize_rcu()).
>
> It's also legal to call percpu_ref_kill() multiple times - it only returns
> true once, so callers don't have to reimplement shutdown synchronization.
>
> [akpm@linux-foundation.org: fix build]
> [akpm@linux-foundation.org: coding-style tweak]
> Signed-off-by: Kent Overstreet <koverstreet@google.com>
> Cc: Zach Brown <zab@redhat.com>
> Cc: Felipe Balbi <balbi@ti.com>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Mark Fasheh <mfasheh@suse.com>
> Cc: Joel Becker <jlbec@evilplan.org>
> Cc: Rusty Russell <rusty@rustcorp.com.au>
> Cc: Jens Axboe <axboe@kernel.dk>
> Cc: Asai Thambi S P <asamymuthupa@micron.com>
> Cc: Selvan Mani <smani@micron.com>
> Cc: Sam Bradshaw <sbradshaw@micron.com>
> Cc: Jeff Moyer <jmoyer@redhat.com>
> Cc: Al Viro <viro@zeniv.linux.org.uk>
> Cc: Benjamin LaHaise <bcrl@kvack.org>
> Cc: Tejun Heo <tj@kernel.org>
> Cc: Oleg Nesterov <oleg@redhat.com>
> Cc: Christoph Lameter <cl@linux-foundation.org>
> Cc: Ingo Molnar <mingo@redhat.com>
> Reviewed-by: "Theodore Ts'o" <tytso@mit.edu>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Applied to percpu/for-3.11. Andrew, I removed your SOB as the patch
is routed outside -mm. Please let me know if you want
reviewed/ackd-by added.
git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu.git for-3.11
Thanks a lot!
--
tejun
next prev parent reply other threads:[~2013-06-03 22:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-31 22:26 Kent Overstreet
2013-06-03 22:39 ` Tejun Heo [this message]
2013-06-03 23:02 ` [PATCH] percpu-refcount: Don't use silly cmpxchg() Kent Overstreet
2013-06-03 23:09 ` Tejun Heo
2013-06-05 7:35 ` [PATCH] Generic percpu refcounting Rusty Russell
2013-06-05 7:44 ` 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=20130603223931.GD29989@mtj.dyndns.org \
--to=tj@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=asamymuthupa@micron.com \
--cc=axboe@kernel.dk \
--cc=balbi@ti.com \
--cc=bcrl@kvack.org \
--cc=cl@linux-foundation.org \
--cc=gregkh@linuxfoundation.org \
--cc=jlbec@evilplan.org \
--cc=jmoyer@redhat.com \
--cc=koverstreet@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mfasheh@suse.com \
--cc=mingo@redhat.com \
--cc=oleg@redhat.com \
--cc=rusty@rustcorp.com.au \
--cc=sbradshaw@micron.com \
--cc=smani@micron.com \
--cc=viro@zeniv.linux.org.uk \
--cc=zab@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
all inboxes | Powered by JetHome®