Re: [PATCH -tip v3 09/11] data_race: Avoid nested statement expression

2020-05-28 Thread Stephen Rothwell
Hi Arnd, On Wed, 27 May 2020 11:26:51 +0200 Arnd Bergmann wrote: > > Right. I think there is still room for optimization around here, but > for v5.8 I'm happy enough with Marco's__unqual_scalar_typeof() > change. Stephen Rothwell is probably the one who's most affected > by compile speed, so it w

Re: [PATCH -tip v3 09/11] data_race: Avoid nested statement expression

2020-05-27 Thread Arnd Bergmann
On Wed, May 27, 2020 at 9:44 AM 'Marco Elver' via Clang Built Linux wrote: > On Wed, 27 May 2020 at 09:22, Will Deacon wrote: > > > > Nice! FWIW, I'm planning to have Alpha override __READ_ONCE_SCALAR() > > eventually, so that smp_read_barrier_depends() can disappear forever. I > > just bit off m

Re: [PATCH -tip v3 09/11] data_race: Avoid nested statement expression

2020-05-27 Thread Marco Elver
On Wed, 27 May 2020 at 09:22, Will Deacon wrote: > > On Wed, May 27, 2020 at 01:10:00AM +0200, Arnd Bergmann wrote: > > On Tue, May 26, 2020 at 9:00 PM Arnd Bergmann wrote: > > > > > > On Tue, May 26, 2020 at 7:33 PM 'Marco Elver' via Clang Built Linux > > > wrote: > > > > On Tue, 26 May 2020, M

Re: [PATCH -tip v3 09/11] data_race: Avoid nested statement expression

2020-05-27 Thread Will Deacon
On Wed, May 27, 2020 at 01:10:00AM +0200, Arnd Bergmann wrote: > On Tue, May 26, 2020 at 9:00 PM Arnd Bergmann wrote: > > > > On Tue, May 26, 2020 at 7:33 PM 'Marco Elver' via Clang Built Linux > > wrote: > > > On Tue, 26 May 2020, Marco Elver wrote: > > > > On Tue, 26 May 2020 at 14:19, Arnd Ber

Re: [PATCH -tip v3 09/11] data_race: Avoid nested statement expression

2020-05-26 Thread Arnd Bergmann
On Tue, May 26, 2020 at 9:00 PM Arnd Bergmann wrote: > > On Tue, May 26, 2020 at 7:33 PM 'Marco Elver' via Clang Built Linux > wrote: > > On Tue, 26 May 2020, Marco Elver wrote: > > > On Tue, 26 May 2020 at 14:19, Arnd Bergmann wrote: > > > Note that an 'allyesconfig' selects KASAN and not KCSAN

Re: [PATCH -tip v3 09/11] data_race: Avoid nested statement expression

2020-05-26 Thread Peter Zijlstra
On Tue, May 26, 2020 at 07:33:12PM +0200, Marco Elver wrote: > diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h > index 5faf68eae204..a529fa263906 100644 > --- a/include/linux/compiler_types.h > +++ b/include/linux/compiler_types.h > @@ -245,7 +245,9 @@ struct ftrace_lik

Re: [PATCH -tip v3 09/11] data_race: Avoid nested statement expression

2020-05-26 Thread Arnd Bergmann
On Tue, May 26, 2020 at 7:33 PM 'Marco Elver' via Clang Built Linux wrote: > On Tue, 26 May 2020, Marco Elver wrote: > > On Tue, 26 May 2020 at 14:19, Arnd Bergmann wrote: > > Note that an 'allyesconfig' selects KASAN and not KCSAN by default. > > But I think that's not relevant, since KCSAN-spec

Re: [PATCH -tip v3 09/11] data_race: Avoid nested statement expression

2020-05-26 Thread Marco Elver
On Tue, 26 May 2020, Marco Elver wrote: > On Tue, 26 May 2020 at 14:19, Arnd Bergmann wrote: > > > > On Tue, May 26, 2020 at 2:02 PM Will Deacon wrote: > > > On Tue, May 26, 2020 at 12:42:16PM +0200, Arnd Bergmann wrote: > > > > > > > > I find this patch only solves half the problem: it's much f

Re: [PATCH -tip v3 09/11] data_race: Avoid nested statement expression

2020-05-26 Thread Marco Elver
On Tue, 26 May 2020 at 14:19, Arnd Bergmann wrote: > > On Tue, May 26, 2020 at 2:02 PM Will Deacon wrote: > > On Tue, May 26, 2020 at 12:42:16PM +0200, Arnd Bergmann wrote: > > > > > > I find this patch only solves half the problem: it's much faster than > > > without the > > > patch, but still m

Re: [PATCH -tip v3 09/11] data_race: Avoid nested statement expression

2020-05-26 Thread Arnd Bergmann
On Tue, May 26, 2020 at 2:02 PM Will Deacon wrote: > On Tue, May 26, 2020 at 12:42:16PM +0200, Arnd Bergmann wrote: > > > > I find this patch only solves half the problem: it's much faster than > > without the > > patch, but still much slower than the current mainline version. As far as > > I'm >

Re: [PATCH -tip v3 09/11] data_race: Avoid nested statement expression

2020-05-26 Thread Will Deacon
On Tue, May 26, 2020 at 12:42:16PM +0200, Arnd Bergmann wrote: > On Thu, May 21, 2020 at 10:21 PM 'Nick Desaulniers' via Clang Built > Linux wrote: > > > > On Thu, May 21, 2020 at 7:22 AM 'Marco Elver' via Clang Built Linux > > wrote: > > > > > > It appears that compilers have trouble with nested

Re: [PATCH -tip v3 09/11] data_race: Avoid nested statement expression

2020-05-26 Thread Arnd Bergmann
On Thu, May 21, 2020 at 10:21 PM 'Nick Desaulniers' via Clang Built Linux wrote: > > On Thu, May 21, 2020 at 7:22 AM 'Marco Elver' via Clang Built Linux > wrote: > > > > It appears that compilers have trouble with nested statement > > expressions. Therefore remove one level of statement expressio

Re: [PATCH -tip v3 09/11] data_race: Avoid nested statement expression

2020-05-21 Thread Nick Desaulniers
On Thu, May 21, 2020 at 7:22 AM 'Marco Elver' via Clang Built Linux wrote: > > It appears that compilers have trouble with nested statement > expressions. Therefore remove one level of statement expression nesting > from the data_race() macro. This will help us avoid potential problems > in future

[PATCH -tip v3 09/11] data_race: Avoid nested statement expression

2020-05-21 Thread Marco Elver
It appears that compilers have trouble with nested statement expressions. Therefore remove one level of statement expression nesting from the data_race() macro. This will help us avoid potential problems in future as its usage increases. Link: https://lkml.kernel.org/r/20200520221712.ga21...@zn.tn