Transactional block conflict resolution based on the determination of executing threads in parallel or in serial mode
First Claim
1. A method, in a data processing system having a plurality of processors and a memory, for handling conflicts in a transactional memory system, comprising:
- executing, by the plurality of processors, threads in the data processing system in a first conflict resolution mode of operation in which the threads execute conflicting transactional blocks speculatively;
determining, by a processor of the plurality of processors, for a transactional block, whether the first conflict resolution mode of operation is to be transitioned to a second conflict resolution mode of operation in which the threads accessing the conflicting transactional blocks are executed serially and non-speculatively;
executing, by the processor, a thread that accesses the transactional block using the second conflict resolution mode of operation in response to the determination indicating that the first conflict resolution mode of operation is to be transitioned to the second conflict resolution mode of operation; and
determining whether or not to transition the transactional block back from the second conflict resolution mode of operation to the first conflict resolution mode of operation, wherein the determining whether or not to transition the transactional block back from the second conflict resolution mode of operation to the first conflict resolution made of operation comprises;
maintaining, in the transactional block profile entry, a transition counter identifying a number of accesses to transactional blocks having a same classification associated with the transactional block that have occurred since the transactional block was transitioned to the second conflict resolution mode of operation;
determining whether the transition counter has a value that meets or exceeds a predetermined threshold; and
transitioning the transactional block from the second conflict resolution mode of operation to the first conflict resolution mode of operation in response to the transition counter having the value that meets or exceeds the predetermined threshold.
1 Assignment
0 Petitions
Accused Products
Abstract
Mechanisms are provided for handling conflicts in a transactional memory system. The mechanisms execute threads in a data processing system in a first conflict resolution mode of operation in which threads execute conflicting transactional blocks speculatively. The mechanisms determine, for a transactional block, if the first conflict resolution mode of operation is to be transitioned to a second conflict resolution mode of operation in which threads accessing conflicting transactional blocks are executed serially and non-speculatively. Moreover, the mechanisms execute a thread that accesses the transactional block using the second conflict resolution mode of operation in response to the determination indicating that the first conflict resolution mode of operation is to be transitioned to the second conflict resolution mode of operation.
-
Citations
18 Claims
-
1. A method, in a data processing system having a plurality of processors and a memory, for handling conflicts in a transactional memory system, comprising:
-
executing, by the plurality of processors, threads in the data processing system in a first conflict resolution mode of operation in which the threads execute conflicting transactional blocks speculatively; determining, by a processor of the plurality of processors, for a transactional block, whether the first conflict resolution mode of operation is to be transitioned to a second conflict resolution mode of operation in which the threads accessing the conflicting transactional blocks are executed serially and non-speculatively; executing, by the processor, a thread that accesses the transactional block using the second conflict resolution mode of operation in response to the determination indicating that the first conflict resolution mode of operation is to be transitioned to the second conflict resolution mode of operation; and determining whether or not to transition the transactional block back from the second conflict resolution mode of operation to the first conflict resolution mode of operation, wherein the determining whether or not to transition the transactional block back from the second conflict resolution mode of operation to the first conflict resolution made of operation comprises; maintaining, in the transactional block profile entry, a transition counter identifying a number of accesses to transactional blocks having a same classification associated with the transactional block that have occurred since the transactional block was transitioned to the second conflict resolution mode of operation; determining whether the transition counter has a value that meets or exceeds a predetermined threshold; and transitioning the transactional block from the second conflict resolution mode of operation to the first conflict resolution mode of operation in response to the transition counter having the value that meets or exceeds the predetermined threshold. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14)
-
-
15. A computer program product comprising a non-transitory computer readable storage medium having a computer readable program recorded thereon, wherein the computer readable program, when executed on a data processing system, causes the data processing system to:
-
execute threads, in the data processing system, in a first conflict resolution mode of operation in which the threads execute conflicting transactional blocks speculatively; determine, for a transactional block, whether the first conflict resolution mode of operation is to be transitioned to a second conflict resolution mode of operation in which the threads accessing the conflicting transactional blocks are executed serially and non-speculatively; execute a thread that accesses the transactional block using the second conflict resolution mode of operation in response to the determination indicating that the first conflict resolution mode of operation is to be transitioned to the second conflict resolution mode of operation; and determine whether or not to transition the transactional block back from the second conflict resolution mode of operation to the first conflict resolution mode of operation, wherein the computer readable program to determine whether or not to transition the transactional block back from the second conflict resolution mode of operation to the first conflict resolution mode of operation further causes the data processing system to; maintain, in the transactional block profile entry, a transition counter identifying a number of accesses to transactional blocks having a same classification associated with the transactional block that have occurred since the transactional block was transitioned to the second conflict resolution mode of operation; determine whether the transition counter has a value that meets or exceeds a predetermined threshold; and transition the transactional block from the second conflict resolution mode of operation to the first conflict resolution mode of operation in response to the transition counter having the value that meets or exceeds the predetermined threshold. - View Dependent Claims (16, 17)
-
-
18. An apparatus, comprising:
-
a processor; and a memory coupled to the processor, wherein the memory comprises instructions which, when executed by the processor, cause the processor to; execute threads in a first conflict resolution mode of operation in which the threads execute conflicting transactional blocks speculatively; determine, for a transactional block, whether the first conflict resolution mode of operation is to be transitioned to a second conflict resolution mode of operation in which the threads accessing the conflicting transactional blocks are executed serially and non-speculatively; execute a thread that accesses the transactional block using the second conflict resolution mode of operation in response to the determination indicating that the first conflict resolution mode of operation is to be transitioned to the second conflict resolution mode of operation; and determine whether or not to transition the transactional block back from the second conflict resolution mode of operation to the first conflict resolution mode of operation, wherein the instructions to determine whether or not to transition the transactional block back from the second conflict resolution mode of operation to the first conflict resolution mode of operation further causes the processor to; maintain, in the transactional block profile entry, a transition counter identifying a number of accesses to transactional blocks having a same classification associated with the transactional block that have occurred since the transactional block was transitioned to the second conflict resolution mode of operation; determine whether the transition counter has a value that meets or exceeds a predetermined threshold; and transition the transactional block from the second conflict resolution mode of operation to the first conflict resolution mode of operation in response to the transition counter having the value that meets or exceeds the predetermined threshold.
-
Specification