Re: [PATCH 0/7] atomics: generate atomic headers

2018-06-05 Thread Mark Rutland
On Tue, Jun 05, 2018 at 04:14:16PM +0200, Peter Zijlstra wrote: > On Tue, Jun 05, 2018 at 02:58:23PM +0100, Mark Rutland wrote: > > > Sure, it all works, it's just less than optimal as above, and also means > > that we have to duplicate the ifdeffery for optional atomics -- once in > > the

Re: [PATCH 0/7] atomics: generate atomic headers

2018-06-05 Thread Mark Rutland
On Tue, Jun 05, 2018 at 04:14:16PM +0200, Peter Zijlstra wrote: > On Tue, Jun 05, 2018 at 02:58:23PM +0100, Mark Rutland wrote: > > > Sure, it all works, it's just less than optimal as above, and also means > > that we have to duplicate the ifdeffery for optional atomics -- once in > > the

Re: [PATCH 0/7] atomics: generate atomic headers

2018-06-05 Thread Peter Zijlstra
On Tue, Jun 05, 2018 at 02:58:23PM +0100, Mark Rutland wrote: > Sure, it all works, it's just less than optimal as above, and also means > that we have to duplicate the ifdeffery for optional atomics -- once in > the instrumented atomics, then in the "real" atomics. > > Whereas if we filled in

Re: [PATCH 0/7] atomics: generate atomic headers

2018-06-05 Thread Peter Zijlstra
On Tue, Jun 05, 2018 at 02:58:23PM +0100, Mark Rutland wrote: > Sure, it all works, it's just less than optimal as above, and also means > that we have to duplicate the ifdeffery for optional atomics -- once in > the instrumented atomics, then in the "real" atomics. > > Whereas if we filled in

Re: [PATCH 0/7] atomics: generate atomic headers

2018-06-05 Thread Mark Rutland
On Tue, Jun 05, 2018 at 03:29:49PM +0200, Peter Zijlstra wrote: > On Tue, May 29, 2018 at 07:07:39PM +0100, Mark Rutland wrote: > > Longer-term, I think things could be simplified if we were to rework the > > headers such that we have: > > > > * arch/*/include/asm/atomic.h providing

Re: [PATCH 0/7] atomics: generate atomic headers

2018-06-05 Thread Mark Rutland
On Tue, Jun 05, 2018 at 03:29:49PM +0200, Peter Zijlstra wrote: > On Tue, May 29, 2018 at 07:07:39PM +0100, Mark Rutland wrote: > > Longer-term, I think things could be simplified if we were to rework the > > headers such that we have: > > > > * arch/*/include/asm/atomic.h providing

Re: [PATCH 0/7] atomics: generate atomic headers

2018-06-05 Thread Peter Zijlstra
On Tue, May 29, 2018 at 07:07:39PM +0100, Mark Rutland wrote: > Longer-term, I think things could be simplified if we were to rework the > headers such that we have: > > * arch/*/include/asm/atomic.h providing arch_atomic_*(). > > * include/linux/atomic-raw.h building raw_atomic_*() atop of the

Re: [PATCH 0/7] atomics: generate atomic headers

2018-06-05 Thread Peter Zijlstra
On Tue, May 29, 2018 at 07:07:39PM +0100, Mark Rutland wrote: > Longer-term, I think things could be simplified if we were to rework the > headers such that we have: > > * arch/*/include/asm/atomic.h providing arch_atomic_*(). > > * include/linux/atomic-raw.h building raw_atomic_*() atop of the

Re: [PATCH 0/7] atomics: generate atomic headers

2018-06-05 Thread Peter Zijlstra
On Mon, Jun 04, 2018 at 06:21:22PM +0200, Dmitry Vyukov wrote: > On Tue, May 29, 2018 at 8:07 PM, Mark Rutland wrote: > > While the diff stat looks like a huge addition, the scripting comes in > > at ~800 lines in total, including the fallback definitions, so we're > > removing ~1000 lines of

Re: [PATCH 0/7] atomics: generate atomic headers

2018-06-05 Thread Peter Zijlstra
On Mon, Jun 04, 2018 at 06:21:22PM +0200, Dmitry Vyukov wrote: > On Tue, May 29, 2018 at 8:07 PM, Mark Rutland wrote: > > While the diff stat looks like a huge addition, the scripting comes in > > at ~800 lines in total, including the fallback definitions, so we're > > removing ~1000 lines of

Re: [PATCH 0/7] atomics: generate atomic headers

2018-06-04 Thread Mark Rutland
On Mon, Jun 04, 2018 at 06:21:22PM +0200, Dmitry Vyukov wrote: > On Tue, May 29, 2018 at 8:07 PM, Mark Rutland wrote: > > This series scripts the generation of the various atomic headers, to > > ensure that the various atomic APIs remain consistent, reducing the risk > > of human error, and

Re: [PATCH 0/7] atomics: generate atomic headers

2018-06-04 Thread Mark Rutland
On Mon, Jun 04, 2018 at 06:21:22PM +0200, Dmitry Vyukov wrote: > On Tue, May 29, 2018 at 8:07 PM, Mark Rutland wrote: > > This series scripts the generation of the various atomic headers, to > > ensure that the various atomic APIs remain consistent, reducing the risk > > of human error, and

Re: [PATCH 0/7] atomics: generate atomic headers

2018-06-04 Thread Dmitry Vyukov
On Tue, May 29, 2018 at 8:07 PM, Mark Rutland wrote: > This series scripts the generation of the various atomic headers, to > ensure that the various atomic APIs remain consistent, reducing the risk > of human error, and simplifying future rework. > > The series is based on my atomic API cleanup

Re: [PATCH 0/7] atomics: generate atomic headers

2018-06-04 Thread Dmitry Vyukov
On Tue, May 29, 2018 at 8:07 PM, Mark Rutland wrote: > This series scripts the generation of the various atomic headers, to > ensure that the various atomic APIs remain consistent, reducing the risk > of human error, and simplifying future rework. > > The series is based on my atomic API cleanup

[PATCH 0/7] atomics: generate atomic headers

2018-05-29 Thread Mark Rutland
This series scripts the generation of the various atomic headers, to ensure that the various atomic APIs remain consistent, reducing the risk of human error, and simplifying future rework. The series is based on my atomic API cleanup patches [1,2], and can be found on my atomics/generated branch

[PATCH 0/7] atomics: generate atomic headers

2018-05-29 Thread Mark Rutland
This series scripts the generation of the various atomic headers, to ensure that the various atomic APIs remain consistent, reducing the risk of human error, and simplifying future rework. The series is based on my atomic API cleanup patches [1,2], and can be found on my atomics/generated branch