On Thu, 19 Dec 2024, Paul E. McKenney wrote: > > Making just these (see below) one-liner changes to tree_exp.h and > > smp.c respectively, lets me boot kernel 6.12.5 on alpha without > > passing any special rcu parameters to the kernel and it also lets me > > load/unload my scsi kernel module. Is the alignment of structs just > > giving gcc more room to clobber the stack without actually hitting > > anything important or is it relevant for how kernel threads access > > structs on weak memory-model architectures? > > This looks like the aforementioned bug in Alpha's compilers, namely > failing to comply with C11's restrictions against compiler-induced > data races. I can't say that I am at all excited about accepting these > changes because they increase stack size. > > The best thing would of course be to fix the compiler. If that cannot > be done, why not just carry these patches? Right. Magnus, has your kernel been built with compiler options implying BWX support? If not, can you please rebuild it accordingly and see if it changes anything? Also a data race between RMW accesses can't be ruled out even with BWX Alphas, because GCC insists on producing those sequences, as I discovered in the course of implementing said GCC fix for data safety[1]. For BWX use it should be ready to build a working kernel right away, because no unaligned LL/SC emulation is required, so Magnus, can you please try the patchset out in the second step and see if it makes any change? Of course it might break things horribly too, as I still haven't got to verifying the BWX side beyond the assembly pattern match snippets in the GCC testsuite (to be done hopefully in the next couple of weeks). References: [1] "Fix data races with sub-longword accesses on Alpha", <https://inbox.sourceware.org/gcc-patches/alpine.DEB.2.21.2411141652300.9262@xxxxxxxxxxxxxxxxx/> Maciej