summaryrefslogtreecommitdiffstats
path: root/kernel/locking/qspinlock.c
diff options
context:
space:
mode:
authorPaul E. McKenney2016-06-16 01:08:17 +0200
committerIngo Molnar2016-06-17 09:54:45 +0200
commitebff09a6ff164aec2b33bf1f9a488c45ac108413 (patch)
tree4c2e43caeacbd254daa8439564e991b1de82750c /kernel/locking/qspinlock.c
parentlocking/spinlock, netfilter: Fix nf_conntrack_lock() barriers (diff)
downloadkernel-qcow2-linux-ebff09a6ff164aec2b33bf1f9a488c45ac108413.tar.gz
kernel-qcow2-linux-ebff09a6ff164aec2b33bf1f9a488c45ac108413.tar.xz
kernel-qcow2-linux-ebff09a6ff164aec2b33bf1f9a488c45ac108413.zip
locking/Documentation: Clarify limited control-dependency scope
Nothing in the control-dependencies section of memory-barriers.txt says that control dependencies don't extend beyond the end of the if-statement containing the control dependency. Worse yet, in many situations, they do extend beyond that if-statement. In particular, the compiler cannot destroy the control dependency given proper use of READ_ONCE() and WRITE_ONCE(). However, a weakly ordered system having a conditional-move instruction provides the control-dependency guarantee only to code within the scope of the if-statement itself. This commit therefore adds words and an example demonstrating this limitation of control dependencies. Reported-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: corbet@lwn.net Cc: linux-arch@vger.kernel.org Cc: linux-doc@vger.kernel.org Link: http://lkml.kernel.org/r/20160615230817.GA18039@linux.vnet.ibm.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/locking/qspinlock.c')
0 files changed, 0 insertions, 0 deletions