Hi,

 This is v3 of the series comprising the final 4 outstanding changes.  I 
note that the corresponding v2 patches have been approved, but concerns 
were discussed, which this update has addressed.

 This series has come out of a discussion[1] around the removal of non-BWX 
Alpha support from the Linux kernel due to data races affecting RCU 
algorithms.

 As it happens these data races also apply to BWX Alpha systems, as I have 
discovered in the course of this effort, although owing to how the Alpha 
backend of GCC has implemented block copy and clear operations rather than 
actual hardware limitations, for example GCC will happily produce code 
such as:

        ldbu $1,0($3)
        stw $31,8($3)
        stq $1,0($3)

to zero a 9-byte member at the byte offset of 1 of a quadword-aligned 
struct, happily clobbering a 1-byte member at the beginning of said struct 
if there is a concurrent or parallel write to that member in the middle of 
the unprotected RMW sequence.

 This patch series addresses these issues in the last two changes, with 
suitable preparations made ahead of them.  The intent for these changes is 
to eventually bring Linux kernel support back for non-BWX systems still in 
people's possession.

 Original v1 has been verified with the `alpha-linux-gnu' (EV4) target 
using a POWER9 system as the host and an AlphaServer 300 (EV45) system as 
the target, with no regressions except where expected due to LDx_L (as 
always the first in a sequence) executed with an unaligned address, 
exceedingly rarely though (4 test cases across all the GCC frontends and 
libraries covered).

 Previous v2 has also been verified with the `alphaev56-linux-gnu' (EV56) 
target using the same POWER9 system and EV68 hardware kindly shared for 
this purpose by Magnus Lindholm <linm...@gmail.com>.

 Current v3 has been verified just as v1, but with emulation added to the 
Linux kernel for unaligned LDx_C/STx_C operations to prevent a data race 
with the unmodified parts of the aligned data quantity pair spanned[2].  
This has produced no regressions at all.

 No Rust frontend or libgrust library verification has been run due to a 
recent version requirement increase for the `cargo' helper tool, which my 
development system cannot currently satisfy and I figured out that getting 
that sorted right now would be the best use of my time.

 More details on testing have been included with the respective changes.

 Previous iterations:

- v2 at: 
<https://inbox.sourceware.org/gcc-patches/alpine.deb.2.21.2501050246590.49...@angie.orcam.me.uk/>.

- v1 at: 
<https://inbox.sourceware.org/gcc-patches/alpine.deb.2.21.2411141652300.9...@angie.orcam.me.uk/>.

References:

[1] "alpha: cleanups for 6.10", 
    <https://lore.kernel.org/r/20240503081125.67990-1-a...@kernel.org/>

[2] "Alpha: Emulate unaligned LDx_L/STx_C for data consistency", 
    
<https://lore.kernel.org/r/alpine.deb.2.21.2502181912230.65...@angie.orcam.me.uk/>

  Maciej

Reply via email to