OSDN Git Service

locking/spinlock, sched/core: Clarify requirements for smp_mb__after_spinlock()
authorAndrea Parri <andrea.parri@amarulasolutions.com>
Mon, 16 Jul 2018 18:06:02 +0000 (11:06 -0700)
committerIngo Molnar <mingo@kernel.org>
Tue, 17 Jul 2018 07:30:33 +0000 (09:30 +0200)
commit3d85b2703783636366560c94842affd8608ec9d1
tree5a4713999d2c9020bf74ffbff3be78ea0dc4dde2
parent76e079fefc8f62bd9b2cd2950814d1ee806e31a5
locking/spinlock, sched/core: Clarify requirements for smp_mb__after_spinlock()

There are 11 interpretations of the requirements described in the header
comment for smp_mb__after_spinlock(): one for each LKMM maintainer, and
one currently encoded in the Cat file. Stick to the latter (until a more
satisfactory solution is available).

This also reworks some snippets related to the barrier to illustrate the
requirements and to link them to the idioms which are relied upon at its
call sites.

Suggested-by: Boqun Feng <boqun.feng@gmail.com>
Signed-off-by: Andrea Parri <andrea.parri@amarulasolutions.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Will Deacon <will.deacon@arm.com>
Cc: akiyks@gmail.com
Cc: dhowells@redhat.com
Cc: j.alglave@ucl.ac.uk
Cc: linux-arch@vger.kernel.org
Cc: luc.maranget@inria.fr
Cc: npiggin@gmail.com
Cc: parri.andrea@gmail.com
Cc: stern@rowland.harvard.edu
Link: http://lkml.kernel.org/r/20180716180605.16115-11-paulmck@linux.vnet.ibm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
include/linux/spinlock.h
kernel/sched/core.c