RE: [RFC v7 3/6] eal: add exactly-once bit access functions

2024-05-08 Thread Morten Brørup
> From: Stephen Hemminger [mailto:step...@networkplumber.org] > Sent: Wednesday, 8 May 2024 17.16 > > On Wed, 8 May 2024 09:33:43 +0200 > Morten Brørup wrote: > > > > What more specifically did you have in mind? READ_ONCE() and > > > WRITE_ONCE()? They give almost no guarantees. Very much relaxe

Re: [RFC v7 3/6] eal: add exactly-once bit access functions

2024-05-08 Thread Stephen Hemminger
On Wed, 8 May 2024 09:33:43 +0200 Morten Brørup wrote: > > What more specifically did you have in mind? READ_ONCE() and > > WRITE_ONCE()? They give almost no guarantees. Very much relaxed. > > The way I read it, they do provide memory ordering guarantees. > > Ignore that the kernel's "once" f

RE: [RFC v7 3/6] eal: add exactly-once bit access functions

2024-05-08 Thread Morten Brørup
> From: Mattias Rönnblom [mailto:hof...@lysator.liu.se] > Sent: Wednesday, 8 May 2024 11.27 > > On 2024-05-08 10:11, Morten Brørup wrote: > >> From: Mattias Rönnblom [mailto:hof...@lysator.liu.se] > >> Sent: Wednesday, 8 May 2024 10.00 > >> > >> On 2024-05-08 09:33, Morten Brørup wrote: > Fro

Re: [RFC v7 3/6] eal: add exactly-once bit access functions

2024-05-08 Thread Mattias Rönnblom
On 2024-05-08 10:11, Morten Brørup wrote: From: Mattias Rönnblom [mailto:hof...@lysator.liu.se] Sent: Wednesday, 8 May 2024 10.00 On 2024-05-08 09:33, Morten Brørup wrote: From: Mattias Rönnblom [mailto:hof...@lysator.liu.se] Sent: Wednesday, 8 May 2024 08.47 On 2024-05-07 21:17, Morten Brørup

RE: [RFC v7 3/6] eal: add exactly-once bit access functions

2024-05-08 Thread Morten Brørup
> From: Mattias Rönnblom [mailto:hof...@lysator.liu.se] > Sent: Wednesday, 8 May 2024 10.00 > > On 2024-05-08 09:33, Morten Brørup wrote: > >> From: Mattias Rönnblom [mailto:hof...@lysator.liu.se] > >> Sent: Wednesday, 8 May 2024 08.47 > >> > >> On 2024-05-07 21:17, Morten Brørup wrote: > Fro

Re: [RFC v7 3/6] eal: add exactly-once bit access functions

2024-05-08 Thread Mattias Rönnblom
On 2024-05-08 09:33, Morten Brørup wrote: From: Mattias Rönnblom [mailto:hof...@lysator.liu.se] Sent: Wednesday, 8 May 2024 08.47 On 2024-05-07 21:17, Morten Brørup wrote: From: Mattias Rönnblom [mailto:mattias.ronnb...@ericsson.com] Sent: Sunday, 5 May 2024 10.38 Add test/set/clear/assign/fli

RE: [RFC v7 3/6] eal: add exactly-once bit access functions

2024-05-08 Thread Morten Brørup
> From: Mattias Rönnblom [mailto:hof...@lysator.liu.se] > Sent: Wednesday, 8 May 2024 08.47 > > On 2024-05-07 21:17, Morten Brørup wrote: > >> From: Mattias Rönnblom [mailto:mattias.ronnb...@ericsson.com] > >> Sent: Sunday, 5 May 2024 10.38 > >> > >> Add test/set/clear/assign/flip functions which

Re: [RFC v7 3/6] eal: add exactly-once bit access functions

2024-05-07 Thread Mattias Rönnblom
On 2024-05-07 21:17, Morten Brørup wrote: From: Mattias Rönnblom [mailto:mattias.ronnb...@ericsson.com] Sent: Sunday, 5 May 2024 10.38 Add test/set/clear/assign/flip functions which prevents certain compiler optimizations and guarantees that program-level memory loads and/or stores will actually

RE: [RFC v7 3/6] eal: add exactly-once bit access functions

2024-05-07 Thread Morten Brørup
> From: Mattias Rönnblom [mailto:mattias.ronnb...@ericsson.com] > Sent: Sunday, 5 May 2024 10.38 > > Add test/set/clear/assign/flip functions which prevents certain > compiler optimizations and guarantees that program-level memory loads > and/or stores will actually occur. > > These functions are

[RFC v7 3/6] eal: add exactly-once bit access functions

2024-05-05 Thread Mattias Rönnblom
Add test/set/clear/assign/flip functions which prevents certain compiler optimizations and guarantees that program-level memory loads and/or stores will actually occur. These functions are useful when interacting with memory-mapped hardware devices. The "once" family of functions does not promise