core-to-core-latency icon indicating copy to clipboard operation
core-to-core-latency copied to clipboard

CAS Atomic is not NUMA aware

Open SoilRos opened this issue 8 months ago • 3 comments

I just measured my machine (Ryzen Milan) and got very similar results as https://github.com/nviennot/core-to-core-latency#dual-amd-epyc-7r13-48-cores-milan-3rd-gen-2021-q1.

However, I was not happy with this asymmetric result on the dual socket case so I re-implementing the CAS benchmark (but in c++ since I don't know rust). I found out the strange behavior is just artifact from the fact that the atomic variable is being stored in one Numa domain (first touch policy) but used in another one. The solution is to create a new atomic variable on every new cycle or to move the page containing with the atomic to the ping/pong threads.

SoilRos avatar Dec 12 '23 01:12 SoilRos