Software assisted nested hardware transactions
First Claim
1. An apparatus comprising:
- execution resources to execute first transaction and a second transaction nested in the first transaction;
a monitoring module to detect an invalidating event during execution of the second transaction;
a logging module to take a second-level snapshot of a second-level value in a memory location to be changed during execution of the second transaction; and
a roll-back module to roll-back the memory location to the second-level snapshot, upon the monitor module detecting an invalidating event during execution of the second transaction.
1 Assignment
0 Petitions
Accused Products
Abstract
A method and apparatus for efficiently executing nested transactions is herein described. Hardware support for execution of transactions is provided. Additionally, through the use of logging previous values immediately before a current nested transaction in a local memory and storage of a stack of handlers associated with a hierarchy of transactions, nested transactions are potentially efficiently executed. Upon a failure, abort, or invalidating event/access within a nested transaction, the state of variables or memory locations written to during execution of the nested transaction are rolled-back to immediately before the nested transaction, instead of all the way back to an original state of the variables or memory locations before an enclosing transaction. As a result, nested transactions may be re-executed within enclosing transactions, without flattening the enclosing and nested transactions to re-execute everything.
166 Citations
42 Claims
-
1. An apparatus comprising:
-
execution resources to execute first transaction and a second transaction nested in the first transaction;
a monitoring module to detect an invalidating event during execution of the second transaction;
a logging module to take a second-level snapshot of a second-level value in a memory location to be changed during execution of the second transaction; and
a roll-back module to roll-back the memory location to the second-level snapshot, upon the monitor module detecting an invalidating event during execution of the second transaction. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. An apparatus comprising:
a processor including execution logic to execute a first transaction and a second transaction nested within the first transaction;
monitoring logic to determine if an invalidating access occurs during execution of the first or second transactions;
a local memory to store a first set of values from memory locations to be written to during execution of the first transaction and, a second set of values from memory locations to be written to during execution of the second transaction;
a handler module to restore the memory locations to be written to during execution of the second transaction to the second set of values, if an invalidating access occurs during execution of the second transaction. - View Dependent Claims (11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22)
-
23. A system comprising:
-
a multi-resource microprocessor including an execution unit to execute an outer transaction and an inner transaction nested within the outer transaction, a local memory to store a first set of values of a first plurality of locations, which are to be written to during execution of the inner transaction, a first abort handler associated with the inner transaction, when executed, to restore the first plurality of locations to the first set of values;
a default handler, when executed by the execution unit, to initiate execution of the second abort handler, if an invalidating event occurs during execution of the second transaction; and
a system memory coupled to the multi-resource microprocessor to store a first plurality of instructions to be grouped as the outer instruction and a second plurality of instructions to be grouped as the inner transaction. - View Dependent Claims (24, 25, 26, 27, 28)
-
-
29. A method comprising:
-
executing a current level transaction nested within a previous level transaction; and
maintaining a log including a first state of a memory location at the previous level, which is to be written to during execution of the current level;
determining if an invalidating event occurs during execution of the current level transaction;
restoring the memory location to the first state of the memory location at the previous level, if an invalidating event is detected during execution of the current level transaction; and
merging the log with a second state of the memory location at the current level, if no invalidating event occurs during execution of the current level transaction. - View Dependent Claims (30, 31, 32, 33, 34, 35)
-
-
36. A method comprising:
-
pushing an abort handler associated with a current nested transaction onto a stack of abort handlers;
logging a first value of a first memory location, which is to be changed during execution of the current nested transaction, in a local memory, before changing the value of the first memory location; and
determining with hardware if an invalidating event occurs during execution of the current nested transaction;
if an invalidating event occurs during execution of the current nested transaction transferring control to the abort handler associated with the current nested transaction, and restoring the first memory location with the first value. - View Dependent Claims (37, 38, 39, 40, 41, 42)
-
Specification