Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More complete implementation of CachePadded #427

Closed
tinco opened this issue Oct 15, 2019 · 2 comments · Fixed by #636
Closed

More complete implementation of CachePadded #427

tinco opened this issue Oct 15, 2019 · 2 comments · Fixed by #636

Comments

@tinco
Copy link

tinco commented Oct 15, 2019

Hi, I'm not sure if more platforms are interesting to you, but I've made a slightly more complete implementation of padding a struct to the cache line size here:

https://github.com/tinco/cache_line_size

I got the information on the cache line sizes from the Go compiler repository, so I'm pretty sure these are correct for all platforms Go runs on, which is a whole bunch.

@ghost
Copy link

ghost commented Oct 15, 2019

Thank you! :) It would be great to have those in our CachePadded

@novacrazy
Copy link

Something else to keep in mind is the difference in cache line size between Intel and AMD.

znver1 and znver2 are the target-cpu values for Zen 1 and Zen 2 AMD CPUs, and I think they have slightly smaller cache line sizes than modern Intel CPUs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

3 participants