I converted a loop to use a __tm_atomic section within an OpenMP parallel for loop. The code actually ran significantly slower with 8 threads on an 8 core system than the original unthreaded loop, which suggests there are a lot of collisions happening.
It would be very useful to have a runtime diagnostic
that tells me how many times there is a collision detected and rolled back. Is there such a tool in existence or planned?
What happens if there is a collision? Does it explicitly
serialize all the operations on retry, or does it requeue the operations for
another parallel attempt?
last question if there is a partial collision, ie 8 threads modify
values but only 2 of the threads happen to collide, is it able to commit the other 6 and retry just the
two that collide, or are they all rolled back?