* [PATCH] s390/locking: Reenable optimistic spinning
@ 2014-08-05 7:57 ` Christian Borntraeger
0 siblings, 0 replies; 3+ messages in thread
From: Christian Borntraeger @ 2014-08-05 7:57 UTC (permalink / raw)
To: linux-kernel
Cc: linux-s390, Martin Schwidefsky, heiko.carstens,
Christian Borntraeger, mingo, Peter Zijlstra, stable
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] s390/locking: Reenable optimistic spinning
@ 2014-08-05 7:57 ` Christian Borntraeger
0 siblings, 0 replies; 3+ messages in thread
From: Christian Borntraeger @ 2014-08-05 7:57 UTC (permalink / raw)
To: linux-kernel
Cc: linux-s390, Martin Schwidefsky, heiko.carstens,
Christian Borntraeger, mingo, Peter Zijlstra, stable
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] s390/locking: Reenable optimistic spinning
2014-08-05 7:57 ` Christian Borntraeger
(?)
@ 2014-08-06 8:34 ` Heiko Carstens
-1 siblings, 0 replies; 3+ messages in thread
From: Heiko Carstens @ 2014-08-06 8:34 UTC (permalink / raw)
To: Christian Borntraeger
Cc: linux-kernel, linux-s390, Martin Schwidefsky, mingo,
Peter Zijlstra, stable
On Tue, Aug 05, 2014 at 09:57:51AM +0200, Christian Borntraeger wrote:
> 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
This can go in via the s390 tree. I applied your patch and changed
it a bit to keep Kconfig sorted.
Thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-08-06 8:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-05 7:57 [PATCH] s390/locking: Reenable optimistic spinning Christian Borntraeger
2014-08-05 7:57 ` Christian Borntraeger
2014-08-06 8:34 ` Heiko Carstens
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.