aboutsummaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/proc.py
diff options
context:
space:
mode:
authorLance Roy <[email protected]>2017-01-23 13:35:18 -0800
committerPaul E. McKenney <[email protected]>2017-01-25 12:53:20 -0800
commitf2c4689640e9a34bc45c013032185ed4ce47e7ff (patch)
treeb83abdbccba941253a9296379e00d09ce355ec2d /scripts/gdb/linux/proc.py
parent52d7e48b86fc108e45a656d8e53e4237993c481d (diff)
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 <[email protected]> Signed-off-by: Lance Roy <[email protected]> Cc: Paul E. McKenney <[email protected]> Cc: Lai Jiangshan <[email protected]> Cc: Peter Zijlstra <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/proc.py')
0 files changed, 0 insertions, 0 deletions