linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHSET percpu/for-3.17] percpu: implement percpu_ref_reinit()
@ 2014-06-18  1:07 Tejun Heo
  2014-06-18  1:08 ` [PATCH 1/6] percpu-refcount, aio: use percpu_ref_cancel_init() in ioctx_alloc() Tejun Heo
                   ` (6 more replies)
  0 siblings, 7 replies; 28+ messages in thread
From: Tejun Heo @ 2014-06-18  1:07 UTC (permalink / raw)
  To: cl, kmo; +Cc: linux-kernel

Hello,

Currently, percpu_ref destruction - freeing the percpu counter -
happens when the percpu_ref is released.  This while a bit more
convenient restricts how percpu_ref can be used.  It can't be
initialized with static percpu area and it can't be reinitialized
without going through percpu allocation.

There are use cases which can take advantage of cycling percpu_ref
through init/release multiple times.  This patchset separates out
percpu_ref destruction into percpu_exit() which should be invoked
explicitly and introduces percpu_ref_reinit() which can be used to
recycle a released percpu_ref.

This patchset doesn't add any users.  Patchset to use this will soon
be posted.

This patchset contains the following six patches.

 0001-percpu-refcount-aio-use-percpu_ref_cancel_init-in-io.patch
 0002-percpu-refcount-one-bit-is-enough-for-REF_STATUS.patch
 0003-percpu-refcount-add-helpers-for-percpu_count-accesse.patch
 0004-percpu-refcount-use-unsigned-long-for-pcpu_count-poi.patch
 0005-percpu-refcount-require-percpu_ref-to-be-exited-expl.patch
 0006-percpu-refcount-implement-percpu_ref_reinit-and-perc.patch

0001-0004 are prep/cleanups.

0005 separates out percpu destruction into percpu_ref_exit() and 0006
implements percpu_ref_reinit().

This patchset is on top of percpu/for-3.17 6fbc07bbe2b5 ("percpu:
invoke __verify_pcpu_ptr() from the generic part of accessors and
operations").

diffstat follows.

 drivers/target/target_core_tpg.c |    4 +
 fs/aio.c                         |    6 +-
 include/linux/percpu-refcount.h  |   64 +++++++++++++++++++----------
 kernel/cgroup.c                  |    8 ++-
 lib/percpu-refcount.c            |   86 ++++++++++++++++++++++++---------------
 5 files changed, 109 insertions(+), 59 deletions(-)

Thanks.

--
tejun

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2014-06-28 12:11 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-18  1:07 [PATCHSET percpu/for-3.17] percpu: implement percpu_ref_reinit() Tejun Heo
2014-06-18  1:08 ` [PATCH 1/6] percpu-refcount, aio: use percpu_ref_cancel_init() in ioctx_alloc() Tejun Heo
2014-06-25 14:31   ` Benjamin LaHaise
2014-06-25 14:56     ` Tejun Heo
2014-06-25 15:35       ` Benjamin LaHaise
2014-06-25 15:37         ` Tejun Heo
2014-06-18  1:08 ` [PATCH 2/6] percpu-refcount: one bit is enough for REF_STATUS Tejun Heo
2014-06-18  2:37   ` Lai Jiangshan
2014-06-18  1:08 ` [PATCH 3/6] percpu-refcount: add helpers for ->percpu_count accesses Tejun Heo
2014-06-18  1:08 ` [PATCH 4/6] percpu-refcount: use unsigned long for pcpu_count pointer Tejun Heo
2014-06-18  1:08 ` [PATCH 5/6] percpu-refcount: require percpu_ref to be exited explicitly Tejun Heo
2014-06-18  1:08 ` [PATCH 6/6] percpu-refcount: implement percpu_ref_reinit() and percpu_ref_is_zero() Tejun Heo
2014-06-18  3:37   ` Lai Jiangshan
2014-06-18 15:32     ` Tejun Heo
2014-06-19  1:58       ` Lai Jiangshan
2014-06-19  2:07         ` Tejun Heo
2014-06-19  2:27           ` Paul E. McKenney
2014-06-19 13:36             ` Tejun Heo
2014-06-19 17:05               ` Paul E. McKenney
2014-06-19 19:06                 ` Tejun Heo
2014-06-19 21:07                   ` Paul E. McKenney
2014-06-19  2:20   ` [PATCH v2 " Tejun Heo
2014-06-19  3:01     ` Lai Jiangshan
2014-06-19 13:31       ` Tejun Heo
2014-06-19 16:55         ` Paul E. McKenney
2014-06-19 17:03           ` Paul E. McKenney
2014-06-19 19:06             ` Tejun Heo
2014-06-28 12:10 ` [PATCHSET percpu/for-3.17] percpu: implement percpu_ref_reinit() Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).