Method and System for Reducing Abort Rates in Speculative Lock Elision using Contention Management Mechanisms
First Claim
1. A computer-implemented method, comprising:
- attempting to execute a section of code as a transaction using a hardware transactional memory system;
the hardware transactional memory system detecting that the transaction aborted or will abort; and
in response to said detecting;
the hardware transactional memory system sending an indication of said detecting to a software mechanism;
in response to receiving the indication, the software mechanism determining a mode of execution, wherein the mode of execution comprises speculative transaction mode or non-speculative mode;
the software mechanism communicating the determined mode of execution to the hardware transactional memory system; and
the hardware transactional memory system attempting to execute the section of code using the determined mode of execution.
1 Assignment
0 Petitions
Accused Products
Abstract
Hardware-based transactional memory mechanisms, such as Speculative Lock Elision (SLE), may allow multiple threads to concurrently execute critical sections protected by the same lock as speculative transactions. Such transactions may abort due to contention or due to misidentification of code as a critical section. In various embodiments, speculative execution mechanisms may be augmented with software and/or hardware contention management mechanisms to reduce abort rates. Speculative execution hardware may send a hardware interrupt signal to notify software components of a speculative execution event (e.g., abort). Software components may respond by implementing concurrency-throttling mechanisms and/or by determining a mode of execution (e.g., speculative, non-speculative) for a given section and communicating that determination to the hardware speculative execution mechanisms, e.g., by writing it into a lock predictor cache. Subsequently, hardware speculative execution mechanisms may determine a preferred mode of execution for the section by reading the corresponding entry from the lock predictor cache.
159 Citations
20 Claims
-
1. A computer-implemented method, comprising:
-
attempting to execute a section of code as a transaction using a hardware transactional memory system; the hardware transactional memory system detecting that the transaction aborted or will abort; and in response to said detecting; the hardware transactional memory system sending an indication of said detecting to a software mechanism; in response to receiving the indication, the software mechanism determining a mode of execution, wherein the mode of execution comprises speculative transaction mode or non-speculative mode; the software mechanism communicating the determined mode of execution to the hardware transactional memory system; and the hardware transactional memory system attempting to execute the section of code using the determined mode of execution. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A system comprising:
-
one or more processors; a memory coupled to the one or more processors and storing program instructions executable by one or more processors to implement a software contention management mechanism; and a hardware transactional memory implementation; wherein the hardware transactional memory implementation is configured to; attempt to execute a given section of code as a respective transaction; detect that the respective transaction aborted or will abort; and in response to said detecting; send an indication of said detecting to the software contention management mechanism; wherein the software contention management mechanism is configured to; in response to receiving an indication that a given transaction aborted or will abort, determine a mode of execution for a respective section of code, wherein the mode of execution comprises speculative transaction mode or non-speculative mode; and communicate the determined mode of execution to the hardware transactional memory implementation; wherein the hardware transactional memory implementation is further configured to; in response to receiving a determined mode of execution for a given section of code, attempt to execute the section of code using the determined mode of execution. - View Dependent Claims (9, 10, 11, 12, 13, 14)
-
-
15. A computer-readable storage medium storing program instructions computer-executable to implement:
-
receiving an indication from a hardware transactional memory system that an attempt to execute a section of code as a transaction has been aborted or will be aborted; in response to said receiving, determining a mode of execution for the section of code, wherein the mode of execution comprises speculative transaction mode or non-speculative mode; and communicating the determined mode of execution to the hardware transactional memory system. - View Dependent Claims (16, 17, 18, 19, 20)
-
Specification