![](/cs149/fall21content/media/cachecoherence/images/slide_048.jpg)
Back to Lecture Thumbnails
![](/cs149/fall21content/media/users/superscalar/profile.jpg)
superscalar
![](/cs149/fall21content/media/users/yt1118/profile.jpg)
yt1118
perf-c2c
is a useful tool to detect false sharing: https://man7.org/linux/man-pages/man1/perf-c2c.1.html.
![](/cs149/fall21content/media/users/ammaar/profile.jpg)
ammaar
How does one access the size of the cache line? Is it available to the programmer?
![](/cs149/fall21content/media/users/jagriti/profile_inLYns7.jpg)
jagriti
@ammaar - This link talks about how the size of a cache line maybe be programmatically available on Linux (https://stackoverflow.com/questions/794632/programmatically-get-the-cache-line-size)
Please log in to leave a comment.
Copyright 2021 Stanford University
Adding this sort of padding was one way that we improved the performance of our threadpool in assign2 – interesting to see how an understanding of hardware can lead directly to writing much faster code!