From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: stable@vger.kernel.org
Cc: Peter Zijlstra <peterz@infradead.org>,
Will Deacon <will.deacon@arm.com>,
Thomas Gleixner <tglx@linutronix.de>,
Daniel Wagner <daniel.wagner@siemens.com>,
bigeasy@linutronix.de,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Ingo Molnar <mingo@redhat.com>
Subject: [PATCH STABLE v4.9 01/10] locking: Remove smp_read_barrier_depends() from queued_spin_lock_slowpath()
Date: Tue, 18 Dec 2018 23:10:40 +0100 [thread overview]
Message-ID: <20181218221049.6816-2-bigeasy@linutronix.de> (raw)
In-Reply-To: <20181218221049.6816-1-bigeasy@linutronix.de>
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
commit 548095dea63ffc016d39c35b32c628d033638aca upstream.
Queued spinlocks are not used by DEC Alpha, and furthermore operations
such as READ_ONCE() and release/relaxed RMW atomics are being changed
to imply smp_read_barrier_depends(). This commit therefore removes the
now-redundant smp_read_barrier_depends() from queued_spin_lock_slowpath(),
and adjusts the comments accordingly.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
kernel/locking/qspinlock.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/kernel/locking/qspinlock.c b/kernel/locking/qspinlock.c
index a72f5df643f8d..8710fbe8d26c0 100644
--- a/kernel/locking/qspinlock.c
+++ b/kernel/locking/qspinlock.c
@@ -169,7 +169,7 @@ static __always_inline void clear_pending_set_locked(struct qspinlock *lock)
* @tail : The new queue tail code word
* Return: The previous queue tail code word
*
- * xchg(lock, tail)
+ * xchg(lock, tail), which heads an address dependency
*
* p,*,* -> n,*,* ; prev = xchg(lock, node)
*/
@@ -533,13 +533,11 @@ void queued_spin_lock_slowpath(struct qspinlock *lock, u32 val)
if (old & _Q_TAIL_MASK) {
prev = decode_tail(old);
/*
- * The above xchg_tail() is also a load of @lock which generates,
- * through decode_tail(), a pointer.
- *
- * The address dependency matches the RELEASE of xchg_tail()
- * such that the access to @prev must happen after.
+ * The above xchg_tail() is also a load of @lock which
+ * generates, through decode_tail(), a pointer. The address
+ * dependency matches the RELEASE of xchg_tail() such that
+ * the subsequent access to @prev happens after.
*/
- smp_read_barrier_depends();
WRITE_ONCE(prev->next, node);
--
2.20.1
next prev parent reply other threads:[~2018-12-18 22:11 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-18 22:10 [PATCH STABLE v4.9 00/10] Backport for "cache line starvation on x86 Sebastian Andrzej Siewior
2018-12-18 22:10 ` Sebastian Andrzej Siewior [this message]
2018-12-18 22:10 ` [PATCH STABLE v4.9 02/10] locking/qspinlock: Ensure node is initialised before updating prev->next Sebastian Andrzej Siewior
2018-12-18 22:10 ` [PATCH STABLE v4.9 03/10] locking/qspinlock: Bound spinning on pending->locked transition in slowpath Sebastian Andrzej Siewior
2018-12-18 22:10 ` [PATCH STABLE v4.9 04/10] locking/qspinlock: Merge 'struct __qspinlock' into 'struct qspinlock' Sebastian Andrzej Siewior
2018-12-18 22:10 ` [PATCH STABLE v4.9 05/10] locking/qspinlock: Remove unbounded cmpxchg() loop from locking slowpath Sebastian Andrzej Siewior
2018-12-18 22:10 ` [PATCH STABLE v4.9 06/10] locking/qspinlock: Remove duplicate clear_pending() function from PV code Sebastian Andrzej Siewior
2018-12-18 22:10 ` [PATCH STABLE v4.9 07/10] locking/qspinlock: Kill cmpxchg() loop when claiming lock from head of queue Sebastian Andrzej Siewior
2018-12-18 22:10 ` [PATCH STABLE v4.9 08/10] locking/qspinlock: Re-order code Sebastian Andrzej Siewior
2018-12-18 22:10 ` [PATCH STABLE v4.9 09/10] locking/qspinlock/x86: Increase _Q_PENDING_LOOPS upper bound Sebastian Andrzej Siewior
2018-12-18 22:10 ` [PATCH STABLE v4.9 10/10] locking/qspinlock, x86: Provide liveness guarantee Sebastian Andrzej Siewior
2018-12-18 22:35 ` [PATCH STABLE v4.9 00/10] Backport for "cache line starvation on x86 Sasha Levin
-- strict thread matches above, loose matches on Subject: below --
2018-12-13 14:09 Sebastian Andrzej Siewior
2018-12-13 14:09 ` [PATCH STABLE v4.9 01/10] locking: Remove smp_read_barrier_depends() from queued_spin_lock_slowpath() Sebastian Andrzej Siewior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181218221049.6816-2-bigeasy@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=daniel.wagner@siemens.com \
--cc=mingo@redhat.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=stable@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=will.deacon@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox