TSX exports two interfaces - XACQUIRE/XRELEASE (Hardware Lock Elision, HLE) is actually the less powerful of the two. What Andi describes here uses the other interface, Restricted Transactional Memory (RTM) which is the far more powerful interface.
The one advantage of HLE as opposed to RTM is that you can add HLE to existing locking code so that code that runs both on TSX-enabled hardware and non-TSX-enabled hardware still can only use one code path.
So the question isn't "why can't glibc use XACQUIRE/XRELEASE", but rather "why doesn't it have to", and the answer, of course, is that glibc already supports multiple kinds of locks.
Posted Jan 31, 2013 23:11 UTC (Thu) by luto (subscriber, #39314)
[Link]
Except that, if I remember correctly, the HLE interface maintains the illusion locally that you've locked the lock, which would allow recursion detection to work without adding a second cache line to the lock.