Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yes. Linux perf has a c2c hit modify “mode”/“option” that will report precisely this issue.


Perf 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.


What is c2c? Thanks.


c2c 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 and https://joemario.github.io/blog/2016/09/01/c2c-blog/.


Thanks.


Cache to cents? Kernels 2 cents on how your code is utilizing the cache? I have 0 clue too.


Cache 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).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: