News for hackers. Stuff that matters.
Re:Cache invalidation is one of the hardest problems in comp... by prabhu-yu on Sunday November 27, 2022 @02:51AM (#33761255)
Thank you for the respone.

Can we write like this? Klass ssc __attribute__((64));

This could convey more info than padding.

Further, I wish, gcc could have provided an attribute that explicitly forces for the cache line alignment than just generic alignment. Generic scalar type alignment is not same as the cache line alignment.

Example: Klass sc __attribute__((start_at_cache_line));

Re:Cache invalidation is one of the hardest problems in comp... by gpderetta on Sunday November 27, 2022 @04:10AM (#33761583)
alignas(std::hardware_destructive_interference_size) is the portable solution.
Re:Cache invalidation is one of the hardest problems in comp... by prabhu-yu on Sunday November 27, 2022 @07:21PM (#33768421)
Thank you for sharing this. I was not aware of this. But now agree, it is indeed portable solution.