|
|
|
|
|
by CyberDildonics
1918 days ago
|
|
Where is this a problem for you? The broad goal to minimize cache misses is the same as concurrency in general - minimize synchronization. This means understanding dependencies and doing work on each core in chunks that are as large as possible for the amount of latency you can tolerate between synchronizing. |
|
- "Cache alignment and padding often improves performance by reducing false sharing."
- "Software can use the alignment directives available in many compilers to avoid false sharing, and adding such directives is a common step in tuning parallel software."
There's just essentially two or three lines in the book that I could find that refer to optimizing cache use through padding/alignment, and that was after knowing what to search for. Although I wouldn't be surprised if I missed something.
In my experience, the discourse stops at the surface level, which makes the topic appear like it's obvious or trivial. But there are many follow-up questions that naturally arise for me:
- What are the trade-offs of cache-padding shared data? Why does it degrade performance for certain problems?
- What is a good rule-of-thumb for when to prioritize cache padding/alignment over cache locality?
- Are there other best practices like cache padding/alignment/locality that improve performance?
- What is an alignment directive and how does one use it?
I agree with what you've said, I was merely pointing out that I wish parallel programming resources delved more into this subject, as I feel that it's a practical and common issue. I'm sure it's not trivial and requires a fair bit of expertise, but that's why one would reach for a book like this after all.