From: Peter Zijlstra <peterz@infradead.org>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Waiman Long <longman@redhat.com>, Ingo Molnar <mingo@redhat.com>,
Will Deacon <will@kernel.org>, Arnd Bergmann <arnd@arndb.de>,
Boqun Feng <boqun.feng@gmail.com>,
Jonas Bonn <jonas@southpole.se>,
Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>,
Stafford Horne <shorne@gmail.com>,
"James E.J. Bottomley" <James.Bottomley@hansenpartnership.com>,
Helge Deller <deller@gmx.de>,
Michael Ellerman <mpe@ellerman.id.au>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
Heiko Carstens <hca@linux.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>,
Christian Borntraeger <borntraeger@de.ibm.com>,
Alexander Gordeev <agordeev@linux.ibm.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-ia64@vger.kernel.org,
Openrisc <openrisc@lists.librecores.org>,
Parisc List <linux-parisc@vger.kernel.org>,
linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
linux-s390 <linux-s390@vger.kernel.org>
Subject: Re: [PATCH] locking: remove spin_lock_flags() etc
Date: Mon, 25 Oct 2021 09:57:28 +0000 [thread overview]
Message-ID: <YXZ/iLB7BvZtzDMp@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <CAK8P3a0YjaRS+aUCOKGjsfkR3TM49PrG6U4ftG_Fz+OFuyCb0w@mail.gmail.com>
On Sat, Oct 23, 2021 at 06:04:57PM +0200, Arnd Bergmann wrote:
> On Sat, Oct 23, 2021 at 3:37 AM Waiman Long <longman@redhat.com> wrote:
> >> On 10/22/21 7:59 AM, Arnd Bergmann wrote:
> > > From: Arnd Bergmann <arnd@arndb.de>
> > >
> > > As this is all dead code, just remove it and the helper functions built
> > > around it. For arch/ia64, the inline asm could be cleaned up, but
> > > it seems safer to leave it untouched.
> > >
> > > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> >
> > Does that mean we can also remove the GENERIC_LOCKBREAK config option
> > from the Kconfig files as well?
>
> I couldn't figure this out.
>
> What I see is that the only architectures setting GENERIC_LOCKBREAK are
> nds32, parisc, powerpc, s390, sh and sparc64, while the only architectures
> implementing arch_spin_is_contended() are arm32, csky and ia64.
>
> The part I don't understand is whether the option actually does anything
> useful any more after commit d89c70356acf ("locking/core: Remove break_lock
> field when CONFIG_GENERIC_LOCKBREAK=y").
Urgh, what a mess.. AFAICT there's still code in
kernel/locking/spinlock.c that relies on it. Specifically when
GENERIC_LOCKBREAK=y we seem to create _lock*() variants that are
basically TaS locks which drop preempt/irq disable while spinning.
Anybody having this on and not having native TaS locks is in for a rude
surprise I suppose... sparc64 being the obvious candidate there :/
WARNING: multiple messages have this Message-ID (diff)
From: Peter Zijlstra <peterz@infradead.org>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Waiman Long <longman@redhat.com>, Ingo Molnar <mingo@redhat.com>,
Will Deacon <will@kernel.org>, Arnd Bergmann <arnd@arndb.de>,
Boqun Feng <boqun.feng@gmail.com>,
Jonas Bonn <jonas@southpole.se>,
Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>,
Stafford Horne <shorne@gmail.com>,
"James E.J. Bottomley" <James.Bottomley@hansenpartnership.com>,
Helge Deller <deller@gmx.de>,
Michael Ellerman <mpe@ellerman.id.au>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
Heiko Carstens <hca@linux.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>,
Christian Borntraeger <borntraeger@de.ibm.com>,
Alexander Gordeev <agordeev@linux.ibm.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-ia64@vger.kernel.org,
Openrisc <openrisc@lists.librecores.org>,
Parisc List <linux-parisc@vger.kernel.org>,
linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
linux-s390 <linux-s390@vger.kernel.org>
Subject: Re: [PATCH] locking: remove spin_lock_flags() etc
Date: Mon, 25 Oct 2021 11:57:28 +0200 [thread overview]
Message-ID: <YXZ/iLB7BvZtzDMp@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <CAK8P3a0YjaRS+aUCOKGjsfkR3TM49PrG6U4ftG_Fz+OFuyCb0w@mail.gmail.com>
On Sat, Oct 23, 2021 at 06:04:57PM +0200, Arnd Bergmann wrote:
> On Sat, Oct 23, 2021 at 3:37 AM Waiman Long <longman@redhat.com> wrote:
> >> On 10/22/21 7:59 AM, Arnd Bergmann wrote:
> > > From: Arnd Bergmann <arnd@arndb.de>
> > >
> > > As this is all dead code, just remove it and the helper functions built
> > > around it. For arch/ia64, the inline asm could be cleaned up, but
> > > it seems safer to leave it untouched.
> > >
> > > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> >
> > Does that mean we can also remove the GENERIC_LOCKBREAK config option
> > from the Kconfig files as well?
>
> I couldn't figure this out.
>
> What I see is that the only architectures setting GENERIC_LOCKBREAK are
> nds32, parisc, powerpc, s390, sh and sparc64, while the only architectures
> implementing arch_spin_is_contended() are arm32, csky and ia64.
>
> The part I don't understand is whether the option actually does anything
> useful any more after commit d89c70356acf ("locking/core: Remove break_lock
> field when CONFIG_GENERIC_LOCKBREAK=y").
Urgh, what a mess.. AFAICT there's still code in
kernel/locking/spinlock.c that relies on it. Specifically when
GENERIC_LOCKBREAK=y we seem to create _lock*() variants that are
basically TaS locks which drop preempt/irq disable while spinning.
Anybody having this on and not having native TaS locks is in for a rude
surprise I suppose... sparc64 being the obvious candidate there :/
WARNING: multiple messages have this Message-ID (diff)
From: Peter Zijlstra <peterz@infradead.org>
To: openrisc@lists.librecores.org
Subject: [OpenRISC] [PATCH] locking: remove spin_lock_flags() etc
Date: Mon, 25 Oct 2021 11:57:28 +0200 [thread overview]
Message-ID: <YXZ/iLB7BvZtzDMp@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <CAK8P3a0YjaRS+aUCOKGjsfkR3TM49PrG6U4ftG_Fz+OFuyCb0w@mail.gmail.com>
On Sat, Oct 23, 2021 at 06:04:57PM +0200, Arnd Bergmann wrote:
> On Sat, Oct 23, 2021 at 3:37 AM Waiman Long <longman@redhat.com> wrote:
> >> On 10/22/21 7:59 AM, Arnd Bergmann wrote:
> > > From: Arnd Bergmann <arnd@arndb.de>
> > >
> > > As this is all dead code, just remove it and the helper functions built
> > > around it. For arch/ia64, the inline asm could be cleaned up, but
> > > it seems safer to leave it untouched.
> > >
> > > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> >
> > Does that mean we can also remove the GENERIC_LOCKBREAK config option
> > from the Kconfig files as well?
>
> I couldn't figure this out.
>
> What I see is that the only architectures setting GENERIC_LOCKBREAK are
> nds32, parisc, powerpc, s390, sh and sparc64, while the only architectures
> implementing arch_spin_is_contended() are arm32, csky and ia64.
>
> The part I don't understand is whether the option actually does anything
> useful any more after commit d89c70356acf ("locking/core: Remove break_lock
> field when CONFIG_GENERIC_LOCKBREAK=y").
Urgh, what a mess.. AFAICT there's still code in
kernel/locking/spinlock.c that relies on it. Specifically when
GENERIC_LOCKBREAK=y we seem to create _lock*() variants that are
basically TaS locks which drop preempt/irq disable while spinning.
Anybody having this on and not having native TaS locks is in for a rude
surprise I suppose... sparc64 being the obvious candidate there :/
WARNING: multiple messages have this Message-ID (diff)
From: Peter Zijlstra <peterz@infradead.org>
To: Arnd Bergmann <arnd@kernel.org>
Cc: linux-ia64@vger.kernel.org,
"James E.J. Bottomley" <James.Bottomley@hansenpartnership.com>,
Paul Mackerras <paulus@samba.org>,
Alexander Gordeev <agordeev@linux.ibm.com>,
Will Deacon <will@kernel.org>, Jonas Bonn <jonas@southpole.se>,
linux-s390 <linux-s390@vger.kernel.org>,
Arnd Bergmann <arnd@arndb.de>, Helge Deller <deller@gmx.de>,
Christian Borntraeger <borntraeger@de.ibm.com>,
Ingo Molnar <mingo@redhat.com>, Waiman Long <longman@redhat.com>,
Heiko Carstens <hca@linux.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>,
Boqun Feng <boqun.feng@gmail.com>,
Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>,
Openrisc <openrisc@lists.librecores.org>,
Stafford Horne <shorne@gmail.com>,
Parisc List <linux-parisc@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linuxppc-dev <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH] locking: remove spin_lock_flags() etc
Date: Mon, 25 Oct 2021 11:57:28 +0200 [thread overview]
Message-ID: <YXZ/iLB7BvZtzDMp@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <CAK8P3a0YjaRS+aUCOKGjsfkR3TM49PrG6U4ftG_Fz+OFuyCb0w@mail.gmail.com>
On Sat, Oct 23, 2021 at 06:04:57PM +0200, Arnd Bergmann wrote:
> On Sat, Oct 23, 2021 at 3:37 AM Waiman Long <longman@redhat.com> wrote:
> >> On 10/22/21 7:59 AM, Arnd Bergmann wrote:
> > > From: Arnd Bergmann <arnd@arndb.de>
> > >
> > > As this is all dead code, just remove it and the helper functions built
> > > around it. For arch/ia64, the inline asm could be cleaned up, but
> > > it seems safer to leave it untouched.
> > >
> > > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> >
> > Does that mean we can also remove the GENERIC_LOCKBREAK config option
> > from the Kconfig files as well?
>
> I couldn't figure this out.
>
> What I see is that the only architectures setting GENERIC_LOCKBREAK are
> nds32, parisc, powerpc, s390, sh and sparc64, while the only architectures
> implementing arch_spin_is_contended() are arm32, csky and ia64.
>
> The part I don't understand is whether the option actually does anything
> useful any more after commit d89c70356acf ("locking/core: Remove break_lock
> field when CONFIG_GENERIC_LOCKBREAK=y").
Urgh, what a mess.. AFAICT there's still code in
kernel/locking/spinlock.c that relies on it. Specifically when
GENERIC_LOCKBREAK=y we seem to create _lock*() variants that are
basically TaS locks which drop preempt/irq disable while spinning.
Anybody having this on and not having native TaS locks is in for a rude
surprise I suppose... sparc64 being the obvious candidate there :/
next prev parent reply other threads:[~2021-10-25 9:57 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-22 11:59 [PATCH] locking: remove spin_lock_flags() etc Arnd Bergmann
2021-10-22 11:59 ` Arnd Bergmann
2021-10-22 11:59 ` [OpenRISC] " Arnd Bergmann
2021-10-22 11:59 ` Arnd Bergmann
2021-10-22 14:10 ` Helge Deller
2021-10-22 14:10 ` Helge Deller
2021-10-22 14:10 ` [OpenRISC] " Helge Deller
2021-10-22 14:10 ` Helge Deller
2021-10-23 1:37 ` Waiman Long
2021-10-23 1:37 ` Waiman Long
2021-10-23 1:37 ` [OpenRISC] " Waiman Long
2021-10-23 1:37 ` Waiman Long
2021-10-23 16:04 ` Arnd Bergmann
2021-10-23 16:04 ` Arnd Bergmann
2021-10-23 16:04 ` [OpenRISC] " Arnd Bergmann
2021-10-23 16:04 ` Arnd Bergmann
2021-10-25 9:57 ` Peter Zijlstra [this message]
2021-10-25 9:57 ` Peter Zijlstra
2021-10-25 9:57 ` [OpenRISC] " Peter Zijlstra
2021-10-25 9:57 ` Peter Zijlstra
2021-10-25 10:06 ` Peter Zijlstra
2021-10-25 10:06 ` Peter Zijlstra
2021-10-25 10:06 ` [OpenRISC] " Peter Zijlstra
2021-10-25 10:06 ` Peter Zijlstra
2021-10-25 13:06 ` Arnd Bergmann
2021-10-25 13:06 ` Arnd Bergmann
2021-10-25 13:06 ` [OpenRISC] " Arnd Bergmann
2021-10-25 13:06 ` Arnd Bergmann
2021-10-25 14:33 ` Peter Zijlstra
2021-10-25 14:33 ` Peter Zijlstra
2021-10-25 14:33 ` [OpenRISC] " Peter Zijlstra
2021-10-25 14:33 ` Peter Zijlstra
2021-10-27 12:01 ` Michael Ellerman
2021-10-27 12:01 ` Michael Ellerman
2021-10-27 12:01 ` [OpenRISC] " Michael Ellerman
2021-10-27 12:01 ` Michael Ellerman
2021-10-25 15:28 ` Waiman Long
2021-10-25 15:28 ` Waiman Long
2021-10-25 15:28 ` [OpenRISC] " Waiman Long
2021-10-25 15:28 ` Waiman Long
2021-10-25 15:44 ` Arnd Bergmann
2021-10-25 15:44 ` Arnd Bergmann
2021-10-25 15:44 ` [OpenRISC] " Arnd Bergmann
2021-10-25 15:44 ` Arnd Bergmann
2021-10-25 18:25 ` Waiman Long
2021-10-25 18:25 ` Waiman Long
2021-10-25 18:25 ` [OpenRISC] " Waiman Long
2021-10-25 18:25 ` Waiman Long
2021-10-30 14:47 ` [tip: locking/core] locking: Remove " tip-bot2 for Arnd Bergmann
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=YXZ/iLB7BvZtzDMp@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=James.Bottomley@hansenpartnership.com \
--cc=agordeev@linux.ibm.com \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=benh@kernel.crashing.org \
--cc=boqun.feng@gmail.com \
--cc=borntraeger@de.ibm.com \
--cc=deller@gmx.de \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=jonas@southpole.se \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-parisc@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=longman@redhat.com \
--cc=mingo@redhat.com \
--cc=mpe@ellerman.id.au \
--cc=openrisc@lists.librecores.org \
--cc=paulus@samba.org \
--cc=shorne@gmail.com \
--cc=stefan.kristiansson@saunalahti.fi \
--cc=will@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 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.