On Wed, 2013-08-21 at 19:41 +0200, Andi Kleen wrote: > > That's true for x86, but it seems that for s390, we can't easily put the > > xbegin/tbegin into the C++ code because of floating point register > > save/restore issues. The added complexity on the x86 side seemed to be > > a reasonable price for having a general HTM fast path retry handling on > > the C++ side. > > I don't see much point in trying to unify these fast paths for very > different implementations with different properties. It would > not surprise me if the highly tuned end result is different. > > It's kind of like trying to write a portable high performance memcpy().
I agree that highly tuned implementations might eventually be pretty different from each other. Nonetheless, I'm currently not aware of anybody volunteering to really work on highly tuned implementations, in particular regarding the retry policies. Once we get there -- and it would be great if somebody would work on that!, I'm completely fine with separating those bits out. Until then, I think it's preferable to keep things as unified as possible as long as this doesn't come with unreasonable complexity or runtime overheads. Torvald