]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
percpu_ref: remove unnecessary RCU grace period for staggered atomic switching confir...
authorTejun Heo <tj@kernel.org>
Tue, 29 Sep 2015 21:47:16 +0000 (17:47 -0400)
committerTejun Heo <tj@kernel.org>
Wed, 10 Aug 2016 19:02:58 +0000 (15:02 -0400)
commita2f5630cb737787c1bfd9aa894b1bf9f3f4554ea
tree43e66c0656a0cf77954aaba6cb1d6d1f6bac3f8d
parent81abf2525827b29839a78fd55ab0699f033c41a5
percpu_ref: remove unnecessary RCU grace period for staggered atomic switching confirmation

At the beginning, percpu_ref guaranteed a RCU grace period between a
call to percpu_ref_kill_and_confirm() and the invocation of the
confirmation callback.  This guarantee exposed internal implementation
details and got rescinded while switching over to sched RCU; however,
__percpu_ref_switch_to_atomic() still inserts a full sched RCU grace
period even when it can simply wait for the previous attempt.

Remove the unnecessary grace period and perform the confirmation
synchronously for staggered atomic switching attempts.  Update
comments accordingly.

Signed-off-by: Tejun Heo <tj@kernel.org>
lib/percpu-refcount.c