Linus Torvalds writes: (Summary)
I assume what happens is that the anonymous struct ends up containing
fields that are cacheline-aligned, and then the whole anonymous struct
is cacheline-aligned.
is cacheline-aligned.
Which is all kinds of stupid, since the anonymous struct itself does not exist outside of the outer struct. So it would be entirely sufficient to just make the outer struct cacheline aligned (like it used to be), but not align the inner anonymous one - just the fields in it.
in it.
But there may be "reasons" why the inner anonymous one needs to be aligned.
is cacheline-aligned.
Which is all kinds of stupid, since the anonymous struct itself does not exist outside of the outer struct. So it would be entirely sufficient to just make the outer struct cacheline aligned (like it used to be), but not align the inner anonymous one - just the fields in it.
in it.
But there may be "reasons" why the inner anonymous one needs to be aligned.