4 ms·
Yes. Linux perf has a c2c hit modify “mode”/“option” that will report precisely this issue.
by maxwell86 5y ago
Yes. Linux perf has a c2c hit modify “mode”/“option” that will report precisely this issue.
- loeg 5y agoWhat is c2c? Thanks.
- eptcyka 5y agoCache to cents? Kernels 2 cents on how your code is utilizing the cache? I have 0 clue too.
- masklinn 5y agoCache to Cache, It tracks a bunch of cache-related counters, and HITM (hit modify) tracks loads of data modified by either an other core of the same node ("local hitm") or by an other node entirely ("remote hitm"). Here, the contention would have shown up as extreme amounts of both, as each core would almost certainly try atomically updating a value which had just been updated by an other core, with higher than even chances the value had been updated by a core of the other socket (= node).
- tkhattra 5y agoc2c stands for cache-2-cache. perf-c2c allows you to measure cacheline contention - see https://man7.org/linux/man-pages/man1/perf-c2c.1.html https://man7.org/linux/man-pages/man1/perf-c2c.1.html and https://joemario.github.io/blog/2016/09/01/c2c-blog/ https://joemario.github.io/blog/2016/09/01/c2c-blog/.
- loeg 5y agoThanks.
- anarazel 5y agoPerf c2c is extremely useful. Especially when using it with call graphs. Seeing which call stack interacts how with a cache line can make it a lot easier to find solutions to contended cache lines.