aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/rcutorture/formal/srcu-cbmc/empty_includes
diff options
context:
space:
mode:
authorLance Roy <ldr709@gmail.com>2017-01-23 13:35:18 -0800
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2017-01-25 12:53:20 -0800
commitf2c4689640e9a34bc45c013032185ed4ce47e7ff (patch)
treeb83abdbccba941253a9296379e00d09ce355ec2d /tools/testing/selftests/rcutorture/formal/srcu-cbmc/empty_includes
parentrcu: Narrow early boot window of illegal synchronous grace periods (diff)
downloadlinux-dev-f2c4689640e9a34bc45c013032185ed4ce47e7ff.tar.xz
linux-dev-f2c4689640e9a34bc45c013032185ed4ce47e7ff.zip
srcu: Implement more-efficient reader counts
SRCU uses two per-cpu counters: a nesting counter to count the number of active critical sections, and a sequence counter to ensure that the nesting counters don't change while they are being added together in srcu_readers_active_idx_check(). This patch instead uses per-cpu lock and unlock counters. Because both counters only increase and srcu_readers_active_idx_check() reads the unlock counter before the lock counter, this achieves the same end without having to increment two different counters in srcu_read_lock(). This also saves a smp_mb() in srcu_readers_active_idx_check(). Possible bug: There is no guarantee that the lock counter won't overflow during srcu_readers_active_idx_check(), as there are no memory barriers around srcu_flip() (see comment in srcu_readers_active_idx_check() for details). However, this problem was already present before this patch. Suggested-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Signed-off-by: Lance Roy <ldr709@gmail.com> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Lai Jiangshan <jiangshanlai@gmail.com> Cc: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'tools/testing/selftests/rcutorture/formal/srcu-cbmc/empty_includes')
0 files changed, 0 insertions, 0 deletions