On Fri, 07 Jul 2023, Jonas Oberhauser wrote:
[...]
>> This is a request for comments on extending the atomic builtins API to
>> help avoiding redundant memory barriers. Indeed, there are
>> discrepancies between the Linux kernel consistency memory model (LKMM)
>> and the C11/C++11 memory consiste
Hi,
I would like to know what is the official stand of GCC on optimization
of atomic builtins? More precisely, optimization of redundant memory
fences.
I am aware that Clang does some peephole optimization on redundant
fences, but this seem to be limited to a single basic block and does not
reco
On Tue, 04 Jul 2023, Peter Zijlstra wrote:
> On Mon, Jul 03, 2023 at 03:20:31PM -0400, Olivier Dion wrote:
[...]
>> On x86-64 (gcc 13.1 -O2) we get:
>>
>> t0():
>> movl$1, x(%rip)
>> movl$1, %eax
>> xchgl dummy(%rip), %eax
>> lock orq $0, (%rsp)
On Tue, 04 Jul 2023, Alan Stern wrote:
> On Tue, Jul 04, 2023 at 01:19:23PM -0400, Olivier Dion wrote:
>> On Mon, 03 Jul 2023, Alan Stern wrote:
>> > On Mon, Jul 03, 2023 at 03:20:31PM -0400, Olivier Dion wrote:
[...]
> Oh, is that it? Then I misunderstood entirely; I thought you were
> talking
On Mon, 03 Jul 2023, Alan Stern wrote:
> On Mon, Jul 03, 2023 at 03:20:31PM -0400, Olivier Dion wrote:
>> This is a request for comments on extending the atomic builtins API to
>> help avoiding redundant memory barriers. Indeed, there are
>
> What atomic builtins API are you talking about? The k
Hi all,
This is a request for comments on extending the atomic builtins API to
help avoiding redundant memory barriers. Indeed, there are
discrepancies between the Linux kernel consistency memory model (LKMM)
and the C11/C++11 memory consistency model [0]. For example,
fully-ordered atomic opera