From: Peter Zijlstra <peterz@infradead.org>
To: Vineet Gupta <Vineet.Gupta1@synopsys.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>,
"rth@twiddle.net" <rth@twiddle.net>,
"linux@arm.linux.org.uk" <linux@arm.linux.org.uk>,
"will.deacon@arm.com" <will.deacon@arm.com>,
"hskinnemoen@gmail.com" <hskinnemoen@gmail.com>,
"realmz6@gmail.com" <realmz6@gmail.com>,
"dhowells@redhat.com" <dhowells@redhat.com>,
"rkuo@codeaurora.org" <rkuo@codeaurora.org>,
"tony.luck@intel.com" <tony.luck@intel.com>,
"geert@linux-m68k.org" <geert@linux-m68k.org>,
"james.hogan@imgtec.com" <james.hogan@imgtec.com>,
"ralf@linux-mips.org" <ralf@linux-mips.org>,
"jejb@parisc-linux.org" <jejb@parisc-linux.org>,
"benh@kernel.crashing.org" <benh@kernel.crashing.org>,
"heiko.carstens@de.ibm.com" <heiko.carstens@de.ibm.com>,
"davem@davemloft.net" <davem@davemloft.net>,
"cmetcalf@ezchip.com" <cmetcalf@ezchip.com>,
min
Subject: Re: [RFC][PATCH 02/24] arc: Provide atomic_{or,xor,and}
Date: Fri, 10 Jul 2015 09:05:11 +0200 [thread overview]
Message-ID: <20150710070511.GE19282@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <C2D7FE5348E1B147BCA15975FBA23075665AD246@IN01WEMBXB.internal.synopsys.com>
On Fri, Jul 10, 2015 at 04:30:46AM +0000, Vineet Gupta wrote:
>
> Since we are on the topic, the cmpxchg() loop in arch/arc/kernel/smp.c still
> irritates me.
> Do we need a new set of primitives to operate atomically on non atomic_t data or
> does that mean that the data *not* being atomic_t but requiring such semantics is
> the fundamental problem and thus needs to be converted first.
So if you look at the last patch, there's already a few sites that do
things like:
+ atomic_or(*mask, (atomic_t *)&flushcache_cpumask);
Which is of course ugly as hell, but does work.
Esp. inside arch code.
Now the 'problem' with cmpxchg/xchg, the instructions working on !atomic
data is:
http://lkml.kernel.org/r/alpine.LRH.2.02.1406011342470.20831@file01.intranet.prod.int.rdu2.redhat.com
http://lkml.kernel.org/r/20140606175316.GV13930@laptop.programming.kicks-ass.net
And note that includes some arc.
Adding more such primitives will only make it harder on those already
'broken' archs.
WARNING: multiple messages have this Message-ID (diff)
From: Peter Zijlstra <peterz@infradead.org>
To: Vineet Gupta <Vineet.Gupta1@synopsys.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>,
"rth@twiddle.net" <rth@twiddle.net>,
"linux@arm.linux.org.uk" <linux@arm.linux.org.uk>,
"will.deacon@arm.com" <will.deacon@arm.com>,
"hskinnemoen@gmail.com" <hskinnemoen@gmail.com>,
"realmz6@gmail.com" <realmz6@gmail.com>,
"dhowells@redhat.com" <dhowells@redhat.com>,
"rkuo@codeaurora.org" <rkuo@codeaurora.org>,
"tony.luck@intel.com" <tony.luck@intel.com>,
"geert@linux-m68k.org" <geert@linux-m68k.org>,
"james.hogan@imgtec.com" <james.hogan@imgtec.com>,
"ralf@linux-mips.org" <ralf@linux-mips.org>,
"jejb@parisc-linux.org" <jejb@parisc-linux.org>,
"benh@kernel.crashing.org" <benh@kernel.crashing.org>,
"heiko.carstens@de.ibm.com" <heiko.carstens@de.ibm.com>,
"davem@davemloft.net" <davem@davemloft.net>,
"cmetcalf@ezchip.com" <cmetcalf@ezchip.com>,
"mingo@kernel.org" <mingo@kernel.org>
Subject: Re: [RFC][PATCH 02/24] arc: Provide atomic_{or,xor,and}
Date: Fri, 10 Jul 2015 09:05:11 +0200 [thread overview]
Message-ID: <20150710070511.GE19282@twins.programming.kicks-ass.net> (raw)
Message-ID: <20150710070511.9AEfDAty39MU7h5uesqtO162i4a3vA2GSonNTDLTJdA@z> (raw)
In-Reply-To: <C2D7FE5348E1B147BCA15975FBA23075665AD246@IN01WEMBXB.internal.synopsys.com>
On Fri, Jul 10, 2015 at 04:30:46AM +0000, Vineet Gupta wrote:
>
> Since we are on the topic, the cmpxchg() loop in arch/arc/kernel/smp.c still
> irritates me.
> Do we need a new set of primitives to operate atomically on non atomic_t data or
> does that mean that the data *not* being atomic_t but requiring such semantics is
> the fundamental problem and thus needs to be converted first.
So if you look at the last patch, there's already a few sites that do
things like:
+ atomic_or(*mask, (atomic_t *)&flushcache_cpumask);
Which is of course ugly as hell, but does work.
Esp. inside arch code.
Now the 'problem' with cmpxchg/xchg, the instructions working on !atomic
data is:
http://lkml.kernel.org/r/alpine.LRH.2.02.1406011342470.20831@file01.intranet.prod.int.rdu2.redhat.com
http://lkml.kernel.org/r/20140606175316.GV13930@laptop.programming.kicks-ass.net
And note that includes some arc.
Adding more such primitives will only make it harder on those already
'broken' archs.
next prev parent reply other threads:[~2015-07-10 7:05 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-09 17:28 [RFC][PATCH 00/24] arch: Provide atomic logic ops Peter Zijlstra
2015-07-09 17:28 ` [RFC][PATCH 01/24] alpha: Provide atomic_{or,xor,and} Peter Zijlstra
2015-07-09 17:28 ` [RFC][PATCH 02/24] arc: " Peter Zijlstra
2015-07-10 4:30 ` Vineet Gupta
2015-07-10 7:05 ` Peter Zijlstra [this message]
2015-07-10 7:05 ` Peter Zijlstra
2015-07-13 12:43 ` Vineet Gupta
2015-07-09 17:28 ` [RFC][PATCH 03/24] arm: " Peter Zijlstra
2015-07-09 18:02 ` Peter Zijlstra
2015-07-10 10:24 ` Russell King - ARM Linux
2015-07-09 17:28 ` [RFC][PATCH 04/24] arm64: " Peter Zijlstra
2015-07-10 8:42 ` Will Deacon
2015-07-10 8:42 ` Will Deacon
2015-07-10 16:23 ` Peter Zijlstra
2015-07-10 16:23 ` Peter Zijlstra
2015-07-13 9:29 ` Will Deacon
2015-07-13 9:29 ` Will Deacon
2015-07-15 16:01 ` Will Deacon
2015-07-15 16:01 ` Will Deacon
2015-07-15 16:46 ` Peter Zijlstra
2015-07-15 16:46 ` Peter Zijlstra
2015-07-09 17:29 ` [RFC][PATCH 05/24] avr32: " Peter Zijlstra
2015-07-09 17:29 ` [RFC][PATCH 06/24] blackfin: " Peter Zijlstra
2015-07-09 17:29 ` [RFC][PATCH 07/24] hexagon: " Peter Zijlstra
2015-07-09 17:29 ` [RFC][PATCH 08/24] ia64: " Peter Zijlstra
2015-07-09 17:29 ` [RFC][PATCH 09/24] m32r: " Peter Zijlstra
2015-07-09 17:29 ` [RFC][PATCH 10/24] m68k: " Peter Zijlstra
2015-07-10 9:13 ` Geert Uytterhoeven
2015-07-09 17:29 ` [RFC][PATCH 11/24] metag: " Peter Zijlstra
2015-07-09 17:29 ` [RFC][PATCH 12/24] mips: " Peter Zijlstra
2015-07-09 18:45 ` Ralf Baechle
2015-07-09 17:29 ` [RFC][PATCH 13/24] mn10300: " Peter Zijlstra
2015-07-09 17:29 ` [RFC][PATCH 14/24] parisc: " Peter Zijlstra
2015-07-09 17:29 ` [RFC][PATCH 15/24] powerpc: " Peter Zijlstra
2015-07-09 21:49 ` Benjamin Herrenschmidt
2015-07-09 17:29 ` [RFC][PATCH 16/24] sh: " Peter Zijlstra
2015-07-09 17:29 ` [RFC][PATCH 17/24] sparc: " Peter Zijlstra
2015-07-09 18:05 ` David Miller
2015-07-09 17:29 ` [RFC][PATCH 18/24] xtensa: " Peter Zijlstra
2015-07-09 17:29 ` [RFC][PATCH 19/24] s390: " Peter Zijlstra
2015-07-10 7:17 ` Heiko Carstens
2015-07-10 10:22 ` Peter Zijlstra
2015-07-10 10:52 ` Heiko Carstens
2015-07-10 11:28 ` Peter Zijlstra
2015-07-09 17:29 ` [RFC][PATCH 20/24] x86: " Peter Zijlstra
2015-07-09 17:29 ` [RFC][PATCH 21/24] atomic: " Peter Zijlstra
2015-07-09 17:29 ` [RFC][PATCH 22/24] frv: Rewrite atomic implementation Peter Zijlstra
2015-07-09 17:29 ` [RFC][PATCH 23/24] atomic: Collapse all atomic_{set,clear}_mask definitions Peter Zijlstra
2015-07-10 9:10 ` Geert Uytterhoeven
2015-07-10 9:13 ` Vineet Gupta
2015-07-10 10:39 ` Peter Zijlstra
2015-07-10 13:34 ` Chris Metcalf
2015-07-10 13:42 ` Russell King - ARM Linux
2015-07-10 16:27 ` Peter Zijlstra
2015-07-10 17:35 ` Chris Metcalf
2015-07-10 19:45 ` Chris Metcalf
2015-07-09 17:29 ` [RFC][PATCH 24/24] atomic: Replace atomic_{set,clear}_mask() usage Peter Zijlstra
2015-07-09 20:38 ` [PATCH] tile: Provide atomic_{or,xor,and} Chris Metcalf
2015-07-09 20:38 ` Chris Metcalf
2015-07-09 20:49 ` Peter Zijlstra
2015-07-27 12:17 ` [tip:locking/arch-atomic] " tip-bot for Chris Metcalf
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=20150710070511.GE19282@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=Vineet.Gupta1@synopsys.com \
--cc=benh@kernel.crashing.org \
--cc=cmetcalf@ezchip.com \
--cc=davem@davemloft.net \
--cc=dhowells@redhat.com \
--cc=geert@linux-m68k.org \
--cc=heiko.carstens@de.ibm.com \
--cc=hskinnemoen@gmail.com \
--cc=james.hogan@imgtec.com \
--cc=jejb@parisc-linux.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=ralf@linux-mips.org \
--cc=realmz6@gmail.com \
--cc=rkuo@codeaurora.org \
--cc=rth@twiddle.net \
--cc=tony.luck@intel.com \
--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 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.