4 ms·
tl;dr: You need to fall back to "the old way" (e.g. locks, compare-and-swap, etc). Your transaction might get rejected no matter how many retries you do becaus
by bajsejohannes 11y ago
tl;dr: You need to fall back to "the old way" (e.g. locks, compare-and-swap, etc).
Your transaction might get rejected no matter how many retries you do because the memory you touch doesn't all fit in CPU cache. CPU Cache mapping is made complicated by things like 8 way set associative (slide 17) which means something that used to work with transactions might not work if memory layout changes.
Therefore, if you get a rejection, you might want to try again a couple of times, but eventually you'll need to do it some other way.
For an explanation of set associative mapping, see https://www.cs.umd.edu/class/sum2003/cmsc311/Notes/Memory/set.html https://www.cs.umd.edu/class/sum2003/cmsc311/Notes/Memory/se...
This presentation is also a lot easier to understand when watching the whole talk:
http://www.infoq.com/presentations/hardware-transactional-memory http://www.infoq.com/presentations/hardware-transactional-me...