The "cache_line_pad" is useless. The __attribute__((aligned(N)))
is completely sufficient.
> Gcc won't guarantee that it puts different variables adjacently - the
> linker (or even the compiler) can move things around to make them fit
> better. Which is why it would be better to use the separate section trick.
Separate sections are also not needed. While you can't guarantee
adjacency, the object file *does* record the required alignment
and that must be honored by the linker.
Now, separate sections do make sense for minimizing accumulated
padding, but that is a separate issue.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to email@example.com
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/