ABSTRACT
For many years, the accepted wisdom has been that the key to adoption of best-effort hardware transactions is to guarantee progress by combining them with an all software slow-path, to be taken if the hardware transactions fail repeatedly. However, all known generally applicable hybrid transactional memory solutions suffer from a major drawback: the coordination with the software slow-path introduces an unacceptably high instrumentation overhead into the hardware transactions.
This paper overcomes the problem using a new approach which we call reduced hardware (RH) transactions. Instead of an all-software slow path, in RH transactions part of the slow-path is executed using a smaller hardware transaction. The purpose of this hardware component is not to speed up the slow-path (though this is a side effect). Rather, using it we are able to eliminate almost all of the instrumentation from the common hardware fast-path, making it virtually as fast as a pure hardware transaction. Moreover, the "mostly software" slow-path is obstruction-free (no locks), allows execution of long transactions and protected instructions that may typically cause hardware transactions to fail, allows complete concurrency between hardware and software transactions, and uses the shorter hardware transactions only to commit.
Finally, we show how to easily default to a mode allowing an all-software slow-slow mode in case the "mostly software" slow-path fails to commit.
- D. Dice A. Matveev and N. Shavit. Implicit privatization using private transactions. In Transact 2010, Paris, France, 2010.Google Scholar
- Hagit Attiya and Eshcar Hillel. A single-version stm that is multi-versioned permissive. Theory Comput. Syst., 51(4):425--446, 2012.Google ScholarCross Ref
- Hillel Avni and Nir Shavit. Maintaining consistent transactional states without a global clock. In SIROCCO, pages 131--140, 2008. Google ScholarDigital Library
- Dave Christie, Jae-Woong Chung, Stephan Diestelhorst, Michael Hohmuth, Martin Pohlack, Christof Fetzer, Martin Nowack, Torvald Riegel, Pascal Felber, Patrick Marlier, and Etienne Riviàre. Evaluation of amd's advanced synchronization facility within a complete transactional memory stack. In Proceedings of the 5th European conference on Computer systems, pages 27--40, New York, NY, USA, 2010. ACM. Google ScholarDigital Library
- Luke Dalessandro, François Carouge, Sean White, Yossi Lev, Mark Moir, Michael L. Scott, and Michael F. Spear. Hybrid norec: a case study in the effectiveness of best effort hardware transactional memory. SIGPLAN Not., 46(3):39--52, March 2011. Google ScholarCross Ref
- Luke Dalessandro, Michael F. Spear, and Michael L. Scott. Norec: streamlining stm by abolishing ownership records. In Proceedings of the 15th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, PPoPP '10, pages 67--78, New York, NY, USA, 2010. ACM. Google ScholarDigital Library
- Peter Damron, Alexandra Fedorova, Yossi Lev, Victor Luchangco, Mark Moir, and Daniel Nussbaum. Hybrid transactional memory. SIGPLAN Not., 41(11):336--346, October 2006. Google ScholarDigital Library
- D. Dice, O. Shalev, and N. Shavit. Transactional locking II. In Proc. of the 20th International Symposium on Distributed Computing (DISC 2006), pages 194--208, 2006. Google ScholarDigital Library
- D. Dice and N. Shavit. Tlrw: Return of the read-write lock. In Transact 2009, Raleigh, North Carolina, USA, 2009.Google Scholar
- Sanjeev Kumar, Michael Chu, Christopher J. Hughes, Partha Kundu, and Anthony Nguyen. Hybrid transactional memory. In Proceedings of the eleventh ACM SIGPLAN symposium on Principles and practice of parallel programming, PPoPP '06, pages 209--220, New York, NY, USA, 2006. ACM. Google ScholarDigital Library
- Yossi Lev, Mark Moir, and Dan Nussbaum. Phtm: Phased transactional memory. In Workshop on Transactional Computing (Transact), 2007. research.sun.com/scalable/pubs/TRANSACT2007PhTM.pdf, 2007.Google Scholar
- C. Fetzer P. Felber and T. Riegel. Dynamic performance tuning of word-based software transactional memory. In PPoPP '08: Proceedings of the 13th ACM SIGPLAN Symposium on Principles and practice of parallel programming, pages 237--246, New York, NY, USA, 2008. ACM. Google ScholarDigital Library
- Torvald Riegel, Patrick Marlier, Martin Nowack,Pascal Felber, and Christof Fetzer. Optimizing hybrid transactional memory: the importance of nonspeculative operations. In Proceedings of the 23rd ACM symposium on Parallelism in algorithms and architectures, SPAA '11, pages 53--64, New York, NY, USA, 2011. ACM. Google ScholarDigital Library
- Arrvindh Shriraman, Virendra J. Marathe, Sandhya Dwarkadas, Michael L. Scott, David Eisenstat, Christopher Heriot, William N. Scherer III, and Michael F. Spear. Hardware acceleration of software transactional memory. Technical report, DEPT. OF COMPUTER SCIENCE, UNIV. OF ROCHESTER, 2006.Google Scholar
- P. Felber T. Riegel and C. Fetzer. A lazy snapshot algorithm with eager validation. In 20th International Symposium on Distributed Computing (DISC), September 2006. Google ScholarDigital Library
- Amy Wang, Matthew Gaudet, Peng Wu, José Nelson Amaral, Martin Ohmacht, Christopher Barton, Raul Silvera, and Maged Michael. Evaluation of blue gene/q hardware support for transactional memories. In Proceedings of the 21st international conference on Parallel architectures and compilation techniques, PACT '12, pages 127--136, New York, NY, USA, 2012. ACM. Google ScholarDigital Library
- Web. Intel tsx http://software.intel.com/en-us/blogs/2012/02/07/transactional-synchronization-in-haswell, 2012.Google Scholar
Index Terms
- Reduced hardware transactions: a new approach to hybrid transactional memory
Recommendations
Reduced Hardware NOrec: A Safe and Scalable Hybrid Transactional Memory
ASPLOS '15Because of hardware TM limitations, software fallbacks are the only way to make TM algorithms guarantee progress. Nevertheless, all known software fallbacks to date, from simple locks to sophisticated versions of the NOrec Hybrid TM algorithm, have ...
Invyswell: a hybrid transactional memory for haswell's restricted transactional memory
PACT '14: Proceedings of the 23rd international conference on Parallel architectures and compilationThe Intel Haswell processor includes restricted transactional memory (RTM), which is the first commodity-based hardware transactional memory (HTM) to become publicly available. However, like other real HTMs, such as IBM's Blue Gene/Q, Haswell's RTM is ...
Grasping the gap between blocking and non-blocking transactional memories
Transactional memory (TM) is an inherently optimistic abstraction: it allows concurrent processes to execute sequences of shared-data accesses (transactions) speculatively, with an option of aborting them in the future. Early TM designs avoided using ...
Comments