REQ: Looking for access to a Haswell machine to test Boost memory transactions code
Dear Boost Devs, Last night I may have implemented some Boost macro based support for simple memory transactions. Basically one does this: STLLockable lockable; ... BOOST_BEGIN_MEMORY_TRANSACTION(lockable) { // Transaction code } BOOST_END_MEMORY_TRANSACTION(lockable) This can turn into __transaction_relaxed, or Intel TSX falling back onto a spin lock. It's very simple, but it ought to work and with very significant performance improvements on TSX capable hardware. The problem is that I don't have access to an Intel Haswell CPU to test the code upon. I think its design is correct through introspection, but if a kind Boost dev could lend me access to their Haswell machine via SSH - or even just offer to debug some binaries for me, I would be very grateful. Thanks, Niall -- Currently unemployed and looking for work. Work Portfolio: http://careers.stackoverflow.com/nialldouglas/
On Monday 30 September 2013 16:27:52 Niall Douglas wrote:
Dear Boost Devs,
Last night I may have implemented some Boost macro based support for simple memory transactions. Basically one does this:
STLLockable lockable; ... BOOST_BEGIN_MEMORY_TRANSACTION(lockable) { // Transaction code } BOOST_END_MEMORY_TRANSACTION(lockable)
This can turn into __transaction_relaxed, or Intel TSX falling back onto a spin lock. It's very simple, but it ought to work and with very significant performance improvements on TSX capable hardware.
The problem is that I don't have access to an Intel Haswell CPU to test the code upon. I think its design is correct through introspection, but if a kind Boost dev could lend me access to their Haswell machine via SSH - or even just offer to debug some binaries for me, I would be very grateful.
Just in case you don't find the hardware, you can use SDE: http://software.intel.com/en-us/articles/intel-software-development-emulator
On 1 Oct 2013 at 1:04, Andrey Semashev wrote:
The problem is that I don't have access to an Intel Haswell CPU to test the code upon. I think its design is correct through introspection, but if a kind Boost dev could lend me access to their Haswell machine via SSH - or even just offer to debug some binaries for me, I would be very grateful.
Just in case you don't find the hardware, you can use SDE:
http://software.intel.com/en-us/articles/intel-software-development-emulator
It's not bad for testing correctness, rather less so for testing performance if I have a bad algorithm. The problem with Intel TSX you see is it can refuse to work for various reasons. Therefore you have to fallback to spin locking, which means you must merge your spin lock implementation with the memory transaction implementation such that both can coexist, and either code path works with the other. While I think my implementation is close to correct, I have no idea if it's close to optimal, and TSX capable CPUs start at about $250 plus $100 for a new motherboard which is too much for just testing this feature. But thanks for the tip. The other idea I had was to try valgrind as that ought to emulate TSX by now. Niall -- Currently unemployed and looking for work. Work Portfolio: http://careers.stackoverflow.com/nialldouglas/
participants (2)
-
Andrey Semashev
-
Niall Douglas