From: Christian Borntraeger <borntraeger@de.ibm.com>
To: linux-kernel@vger.kernel.org
Cc: linux-s390@vger.kernel.org,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
heiko.carstens@de.ibm.com,
Christian Borntraeger <borntraeger@de.ibm.com>,
<mingo@kernel.org>, Peter Zijlstra <peterz@infradead.org>,
stable@vger.kernel.org
Subject: [PATCH] s390/locking: Reenable optimistic spinning
Date: Tue, 5 Aug 2014 09:57:51 +0200 [thread overview]
Message-ID: <1407225471-14875-1-git-send-email-borntraeger@de.ibm.com> (raw)
commit 4badad352a6bb202ec68afa7a574c0bb961e5ebc (locking/mutex: Disable
optimistic spinning on some architectures) fenced spinning for
architectures without proper cmpxchg.
There is no need to disable mutex spinning on s390, though:
The instructions CS,CSG and friends provide the proper guarantees.
(We dont implement cmpxchg with locks).
Please note: This is a quick fix for s390, suitable for stable
as 3.16 unintenionally disabled optimistic spinning.
The proper fix is probably to use ARCH_HAVE_NMI_SAFE_CMPXCHG
instead of introducing ARCH_SUPPORTS_ATOMIC_RMW.
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
CC: <mingo@kernel.org>
CC: Peter Zijlstra <peterz@infradead.org>
CC: stable@vger.kernel.org
---
arch/s390/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index 9a0ea87..eab3c32 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -63,6 +63,7 @@ config S390
select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
select ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS
select ARCH_HAVE_NMI_SAFE_CMPXCHG
+ select ARCH_SUPPORTS_ATOMIC_RMW
select ARCH_INLINE_READ_LOCK
select ARCH_INLINE_READ_LOCK_BH
select ARCH_INLINE_READ_LOCK_IRQ
--
1.8.4.2
next reply other threads:[~2014-08-05 7:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-05 7:57 Christian Borntraeger [this message]
2014-08-06 8:34 ` [PATCH] s390/locking: Reenable optimistic spinning Heiko Carstens
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=1407225471-14875-1-git-send-email-borntraeger@de.ibm.com \
--to=borntraeger@de.ibm.com \
--cc=heiko.carstens@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=schwidefsky@de.ibm.com \
--cc=stable@vger.kernel.org \
/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