]> www.infradead.org Git - users/jedix/linux-maple.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)
committerChuck Anderson <chuck.anderson@oracle.com>
Sun, 18 Jun 2017 21:03:54 +0000 (14:03 -0700)
commit96334eb6d89797644aa42d56389d6f4907256477
tree997c25606b0398aff4b22cb8324528d53750aef5
parent8b44878598e3cadc0ee40683b521f6e11fbfbee1
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>
(cherry picked from commit a2f5630cb737787c1bfd9aa894b1bf9f3f4554ea)

Orabug: 26254388

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Ashok Vairavan <ashok.vairavan@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
lib/percpu-refcount.c