Re: [PATCH v2 18/18] arm64: select ARCH_SUPPORTS_LTO_CLANG

2017-11-23 Thread Dmitry Vyukov
On Thu, Nov 23, 2017 at 2:42 PM, Alexander Potapenko wrote: > >> > Ideally we'd get the toolchain people to commit to supporting the > >> > kernel > >> > memory model along side the C11 one. That would help a ton. > >> > >> Does anyone from the kernel side participate in

Re: [PATCH v2 18/18] arm64: select ARCH_SUPPORTS_LTO_CLANG

2017-11-23 Thread Alexander Potapenko
On Thu, Nov 16, 2017 at 7:16 PM, Nick Desaulniers wrote: > On Thu, Nov 16, 2017 at 9:48 AM, Paul E. McKenney > wrote: >> On Thu, Nov 16, 2017 at 06:34:17PM +0100, Peter Zijlstra wrote: >>> On Thu, Nov 16, 2017 at 09:16:49AM -0800, Nick Desaulniers wrote: >>> > On Thu, Nov 16, 2017 at 8:59 AM, Pet

Re: [PATCH v2 18/18] arm64: select ARCH_SUPPORTS_LTO_CLANG

2017-11-21 Thread Paul E. McKenney
On Tue, Nov 21, 2017 at 05:23:52PM +, David Laight wrote: > From: Paul E. McKenney > > Sent: 20 November 2017 20:54 > > > > On Mon, Nov 20, 2017 at 08:32:56PM +0100, Peter Zijlstra wrote: > > > On Mon, Nov 20, 2017 at 06:05:55PM +, Will Deacon wrote: > > > > Although the current direction

RE: [PATCH v2 18/18] arm64: select ARCH_SUPPORTS_LTO_CLANG

2017-11-21 Thread David Laight
From: Paul E. McKenney > Sent: 20 November 2017 20:54 > > On Mon, Nov 20, 2017 at 08:32:56PM +0100, Peter Zijlstra wrote: > > On Mon, Nov 20, 2017 at 06:05:55PM +, Will Deacon wrote: > > > Although the current direction of the C++ committee is to prefer > > > that dependencies are explicitly "

Re: [PATCH v2 18/18] arm64: select ARCH_SUPPORTS_LTO_CLANG

2017-11-20 Thread Paul E. McKenney
On Mon, Nov 20, 2017 at 08:32:56PM +0100, Peter Zijlstra wrote: > On Mon, Nov 20, 2017 at 06:05:55PM +, Will Deacon wrote: > > Although the current direction of the C++ committee is to prefer > > that dependencies are explicitly "marked", this is not deemed to be > > acceptable for the kernel (

Re: [PATCH v2 18/18] arm64: select ARCH_SUPPORTS_LTO_CLANG

2017-11-20 Thread Paul E. McKenney
On Mon, Nov 20, 2017 at 08:28:06PM +0100, Peter Zijlstra wrote: > On Mon, Nov 20, 2017 at 06:05:55PM +, Will Deacon wrote: > > This is a thorny issue, but RCU (specifically rcu_dereference but probably > > also some READ_ONCEs) relies on being able to utilise syntactic dependency > > chains to

Re: [PATCH v2 18/18] arm64: select ARCH_SUPPORTS_LTO_CLANG

2017-11-20 Thread Peter Zijlstra
On Mon, Nov 20, 2017 at 06:05:55PM +, Will Deacon wrote: > Although the current direction of the C++ committee is to prefer > that dependencies are explicitly "marked", this is not deemed to be > acceptable for the kernel (in other words, everything is always considered > "marked"). Yeah, that

Re: [PATCH v2 18/18] arm64: select ARCH_SUPPORTS_LTO_CLANG

2017-11-20 Thread Peter Zijlstra
On Mon, Nov 20, 2017 at 06:05:55PM +, Will Deacon wrote: > This is a thorny issue, but RCU (specifically rcu_dereference but probably > also some READ_ONCEs) relies on being able to utilise syntactic dependency > chains to order local accesses to shared variables. Well, we used to have READ_ON

Re: [PATCH v2 18/18] arm64: select ARCH_SUPPORTS_LTO_CLANG

2017-11-20 Thread Peter Zijlstra
On Mon, Nov 20, 2017 at 06:05:55PM +, Will Deacon wrote: > Please don't confuse this with a reluctance to support clang; I'm keen to > see that supported, As an aside; as long as clang doesn't do asm-goto and asm-flag-output (as examples of features that clang lacks and developers have at tim

Re: [PATCH v2 18/18] arm64: select ARCH_SUPPORTS_LTO_CLANG

2017-11-20 Thread Will Deacon
Hi Sami, On Thu, Nov 16, 2017 at 12:17:01PM -0800, Sami Tolvanen wrote: > On Thu, Nov 16, 2017 at 11:13:07AM -0800, Paul E. McKenney wrote: > > Ah, if "this patch set" meant "adding LTO", I stand corrected and I > > apologize for my confusion. > > Again, I'm not proposing for LTO to be enabled by

Re: [PATCH v2 18/18] arm64: select ARCH_SUPPORTS_LTO_CLANG

2017-11-16 Thread Sami Tolvanen
On Thu, Nov 16, 2017 at 11:13:07AM -0800, Paul E. McKenney wrote: > Ah, if "this patch set" meant "adding LTO", I stand corrected and I > apologize for my confusion. Again, I'm not proposing for LTO to be enabled by default. These patches just make it possible to enable it. Are you saying the poss

Re: [PATCH v2 18/18] arm64: select ARCH_SUPPORTS_LTO_CLANG

2017-11-16 Thread Paul E. McKenney
On Thu, Nov 16, 2017 at 06:45:08PM +, Will Deacon wrote: > On Thu, Nov 16, 2017 at 10:39:51AM -0800, Paul E. McKenney wrote: > > On Thu, Nov 16, 2017 at 10:16:22AM -0800, Nick Desaulniers wrote: > > > > On Thu, Nov 16, 2017 at 06:34:17PM +0100, Peter Zijlstra wrote: > > > >> So the problem is t

Re: [PATCH v2 18/18] arm64: select ARCH_SUPPORTS_LTO_CLANG

2017-11-16 Thread Will Deacon
On Thu, Nov 16, 2017 at 10:39:51AM -0800, Paul E. McKenney wrote: > On Thu, Nov 16, 2017 at 10:16:22AM -0800, Nick Desaulniers wrote: > > > On Thu, Nov 16, 2017 at 06:34:17PM +0100, Peter Zijlstra wrote: > > >> So the problem is that its very very hard (and painful) to find these > > >> bugs. Getti

Re: [PATCH v2 18/18] arm64: select ARCH_SUPPORTS_LTO_CLANG

2017-11-16 Thread Paul E. McKenney
On Thu, Nov 16, 2017 at 10:16:22AM -0800, Nick Desaulniers wrote: > On Thu, Nov 16, 2017 at 9:48 AM, Paul E. McKenney > wrote: > > On Thu, Nov 16, 2017 at 06:34:17PM +0100, Peter Zijlstra wrote: > >> On Thu, Nov 16, 2017 at 09:16:49AM -0800, Nick Desaulniers wrote: > >> > On Thu, Nov 16, 2017 at 8

Re: [PATCH v2 18/18] arm64: select ARCH_SUPPORTS_LTO_CLANG

2017-11-16 Thread Nick Desaulniers
On Thu, Nov 16, 2017 at 9:48 AM, Paul E. McKenney wrote: > On Thu, Nov 16, 2017 at 06:34:17PM +0100, Peter Zijlstra wrote: >> On Thu, Nov 16, 2017 at 09:16:49AM -0800, Nick Desaulniers wrote: >> > On Thu, Nov 16, 2017 at 8:59 AM, Peter Zijlstra >> > wrote: >> > > On Thu, Nov 16, 2017 at 08:50:41

Re: [PATCH v2 18/18] arm64: select ARCH_SUPPORTS_LTO_CLANG

2017-11-16 Thread Paul E. McKenney
On Thu, Nov 16, 2017 at 06:34:17PM +0100, Peter Zijlstra wrote: > On Thu, Nov 16, 2017 at 09:16:49AM -0800, Nick Desaulniers wrote: > > On Thu, Nov 16, 2017 at 8:59 AM, Peter Zijlstra > > wrote: > > > On Thu, Nov 16, 2017 at 08:50:41AM -0800, Nick Desaulniers wrote: > > >> On Thu, Nov 16, 2017 at

Re: [PATCH v2 18/18] arm64: select ARCH_SUPPORTS_LTO_CLANG

2017-11-16 Thread Peter Zijlstra
On Thu, Nov 16, 2017 at 09:16:49AM -0800, Nick Desaulniers wrote: > On Thu, Nov 16, 2017 at 8:59 AM, Peter Zijlstra wrote: > > On Thu, Nov 16, 2017 at 08:50:41AM -0800, Nick Desaulniers wrote: > >> On Thu, Nov 16, 2017 at 8:30 AM, Peter Zijlstra > >> wrote: > >> > >> > Ideally we'd get the toolc

Re: [PATCH v2 18/18] arm64: select ARCH_SUPPORTS_LTO_CLANG

2017-11-16 Thread Nick Desaulniers
On Thu, Nov 16, 2017 at 8:59 AM, Peter Zijlstra wrote: > On Thu, Nov 16, 2017 at 08:50:41AM -0800, Nick Desaulniers wrote: >> On Thu, Nov 16, 2017 at 8:30 AM, Peter Zijlstra wrote: >> >> > Ideally we'd get the toolchain people to commit to supporting the kernel >> > memory model along side the C1

Re: [PATCH v2 18/18] arm64: select ARCH_SUPPORTS_LTO_CLANG

2017-11-16 Thread Peter Zijlstra
On Thu, Nov 16, 2017 at 08:50:41AM -0800, Nick Desaulniers wrote: > On Thu, Nov 16, 2017 at 8:30 AM, Peter Zijlstra wrote: > > > Ideally we'd get the toolchain people to commit to supporting the kernel > > memory model along side the C11 one. That would help a ton. > > Does anyone from the kerne

Re: [PATCH v2 18/18] arm64: select ARCH_SUPPORTS_LTO_CLANG

2017-11-16 Thread Nick Desaulniers
On Thu, Nov 16, 2017 at 8:30 AM, Peter Zijlstra wrote: > Ideally we'd get the toolchain people to commit to supporting the kernel > memory model along side the C11 one. That would help a ton. Does anyone from the kernel side participate in the C standardization process?

Re: [PATCH v2 18/18] arm64: select ARCH_SUPPORTS_LTO_CLANG

2017-11-16 Thread Peter Zijlstra
On Thu, Nov 16, 2017 at 08:17:31AM -0800, Sami Tolvanen wrote: > On Thu, Nov 16, 2017 at 11:58:11AM +, Will Deacon wrote: > > I'll be honest with you: I'm absolutely terrified about enabling this. > > That's understandable, I wouldn't want to enable this by default > quite yet either. This pat

Re: [PATCH v2 18/18] arm64: select ARCH_SUPPORTS_LTO_CLANG

2017-11-16 Thread Sami Tolvanen
On Thu, Nov 16, 2017 at 11:58:11AM +, Will Deacon wrote: > I'll be honest with you: I'm absolutely terrified about enabling this. That's understandable, I wouldn't want to enable this by default quite yet either. This patch doesn't enable LTO for arm64, just makes it possible to enable the fea

Re: [PATCH v2 18/18] arm64: select ARCH_SUPPORTS_LTO_CLANG

2017-11-16 Thread Will Deacon
Hi Sami, On Wed, Nov 15, 2017 at 01:34:28PM -0800, Sami Tolvanen wrote: > Allow CONFIG_LTO_CLANG to be enabled for the architecture. > > Signed-off-by: Sami Tolvanen > --- > arch/arm64/Kconfig | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > in

[PATCH v2 18/18] arm64: select ARCH_SUPPORTS_LTO_CLANG

2017-11-15 Thread Sami Tolvanen
Allow CONFIG_LTO_CLANG to be enabled for the architecture. Signed-off-by: Sami Tolvanen --- arch/arm64/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 3a70f763e18a..58504327b9f6 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@