aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2019-04-25 18:50:55 +0200
committerPaul E. McKenney <paulmck@linux.ibm.com>2019-05-28 09:05:23 -0700
commit89da3b94bb97417ca2c5b0ce3a28643819030247 (patch)
tree3a494bdabb013141bbb60f7380b5a0f64d23872b /tools
parentlocking/percpu-rwsem: Add DEFINE_PERCPU_RWSEM(), use it to initialize cgroup_threadgroup_rwsem (diff)
downloadlinux-dev-89da3b94bb97417ca2c5b0ce3a28643819030247.tar.xz
linux-dev-89da3b94bb97417ca2c5b0ce3a28643819030247.zip
rcu/sync: Simplify the state machine
With this patch rcu_sync has a single state variable and the transition rules become really simple: GP_IDLE - owned by the first rcu_sync_enter() which moves it to GP_ENTER - owned by rcu-callback which moves it to GP_PASSED - owned by the last rcu_sync_exit() which moves it to GP_EXIT - and this is the only "nontrivial" state. rcu-callback moves it back to GP_IDLE unless another enter() comes before a GP pass. If rcu-callback is invoked before the next rcu_sync_exit() it must see gp_count incremented by that enter() and set GP_PASSED. Otherwise, if the next rcu_sync_exit() wins the race, it will move it to GP_REPLAY - owned by rcu-callback which moves it to GP_EXIT Signed-off-by: Oleg Nesterov <oleg@redhat.com> [ paulmck: While here, apply READ_ONCE() and WRITE_ONCE() to ->gp_state. ] [ paulmck: Tweaks to make htmldocs happy. (Reported by kbuild test robot.) ] Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions