IP Library › Granted Patent US 8,424,015
Granted Patent B2
US 8,424,015 · App. 12/894,308 · Granted Apr 16, 2013

Transactional memory preemption mechanism

Inventors: Richard L. Arndt (Austin, TX); Harold W. Cain, III (Hartsdale, NY); Bradly G. Frey (Austin, TX); Cathy May (Ossining, NY)
Assignee: International Business Machines Corporation
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 8,424,015
App. No.
12/894,308
Granted
Apr 16, 2013
Kind
B2
Abstract

Mechanisms for executing a transaction in the data processing system are provided. A transaction checkpoint data structure is generated in internal registers of a processor. The transaction checkpoint data structure stores transaction checkpoint data representing a state of program registers at a time prior to execution of a corresponding transaction. The transaction, which comprises a first portion of code that is to be executed by the processor, is executed. An interrupt of the transaction is received while executing the transaction and, as a result, the transaction checkpoint data is stored to a data structure in a memory of the data processing system. A second portion of code is then executed. A state of the program registers is restored using the data structure in the memory of the data processing system in response to an event occurring causing a switch of execution of the processor back to execution of the transaction.

Claims (40)

1. A data processing system, comprising:

a processor; and

a memory coupled to the processor, wherein the processor comprises logic that operates to:

generate a transaction checkpoint data structure in internal registers of the processor, wherein the transaction checkpoint data structure stores transaction checkpoint data representing a state of program registers at a time prior to execution of a corresponding transaction;

execute the transaction, wherein the transaction comprises a first portion of code that is to be executed by the processor;

receive an interrupt of the transaction while executing the transaction;

store the transaction checkpoint data to a data structure in the memory of the data processing system in response to receiving the interrupt;

execute a second portion of code, different than the first portion of code; and

restore a state of the program registers using the data structure in the memory of the data processing system in response to an event occurring causing a switch of execution of the processor back to execution of the transaction, wherein the data structure in the memory is an interrupt context record data structure for a program corresponding to the transaction, and wherein the transaction checkpoint data is stored in a first portion of the interrupt context record data structure, and wherein restoring a state of the program registers using the data structure in the memory of the data processing system comprises:

restoring the program registers to a state corresponding to a state prior to executing the transaction based on the checkpoint data stored in the first portion of the interrupt context record data structure in the memory; and

executing a transaction re-checkpoint instruction to generate a new transaction checkpoint data structure in the internal registers of the processor.

2. The system of claim 1 , wherein the logic further operates to copy state data, identifying a state of the program registers at the time of the interrupt, from the program registers to a second portion of the interrupt context record data structure.

3. The system of claim 2 , wherein restoring a state of the program registers using the data structure in the memory of the data processing system further comprises:

restoring the program registers to a state corresponding to a state when the interrupt was received based on the state data stored in the second portion of the interrupt context record data structure.

4. The system of claim 1 , wherein the logic further operates to:

retrieve a processor mode value from a processor mode register;

determine if the processor mode is a transaction mode; and

perform the operations of storing the transaction checkpoint data, executing the second portion of code, and restoring a state of the program registers only in response to the processor mode being a transaction mode.

5. The system of claim 1 , wherein the logic further operates to:

determine whether the interrupt requires an abort of the transaction; and

restore a state of the program registers to a state prior to execution of the transaction using the transaction checkpoint data structure stored in the internal registers of the processor in response to a determination that the interrupt requires an abort of the transaction.

6. A computer program product comprising a computer readable storage medium having a computer readable program stored therein, wherein the compute readable program, when executed on a data processing system having a processor and a memory, causes the data processing system to:

generate a transaction checkpoint data structure in internal registers of the processor, wherein the transaction checkpoint data structure stores transaction checkpoint data representing a state of program registers at a time prior to execution of a corresponding transaction;

execute the transaction, wherein the transaction comprises a first portion of code that is to be executed by the processor;

receive an interrupt of the transaction while executing the transaction;

store the transaction checkpoint data to a data structure in the memory of the data processing system in response to receiving the interrupt;

execute a second portion of code, different than the first portion of code; and

restore a state of the program registers using the data structure in the memory of the data processing system in response to an event occurring causing a switch of execution of the processor back to execution of the transaction, wherein the data structure in the memory is an interrupt context record data structure for a program corresponding to the transaction, and wherein the transaction checkpoint data is stored in a first portion of the interrupt context record data structure, and wherein restoring a state of the program registers using the data structure in the memory of the data processing system comprises:

restoring the program registers to a state corresponding to a state prior to executing the transaction based on the checkpoint data stored in the first portion of the interrupt context record data structure in the memory; and

executing a transaction re-checkpoint instruction to generate a new transaction checkpoint data structure in the internal registers of the processor.

7. The computer program product of claim 6 , wherein the computer readable program further causes the data processing system to copy state data, identifying a state of the program registers at the time of the interrupt, from the program registers to a second portion of the interrupt context record data structure.

8. The computer program product of claim 7 , wherein the computer readable program further causes the data processing system to restore a state of the program registers using the data structure in the memory of the data processing system by:

restoring the program registers to a state corresponding to a state when the interrupt was received based on the slate data stored in the second portion of the interrupt context record data structure.

9. The computer program product of claim 6 , wherein the computer readable program further causes the data processing system to:

retrieve a processor mode value from a processor mode register;

determine if the processor mode is a transaction mode; and

perform the operations of storing the transaction checkpoint data, executing the second portion of code, and restoring a state of the program registers only in response to the processor mode being a transaction mode.

10. The computer program product of claim 6 , wherein the computer readable program further causes the data processing system to:

determine whether the interrupt requires an abort of the transaction; and

restore a state of the program registers to a state prior to execution of the transaction using the transaction checkpoint data structure stored in the internal registers of the processor in response to a determination that the interrupt requires an abort of the transaction.

Assignments (4)
RELEASE OF SECURITY INTEREST Recorded May 12, 2021
From: WILMINGTON TRUST, NATIONAL ASSOCIATION
To: GLOBALFOUNDRIES U.S. INC.
Reel/Frame 056987/0001 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 5, 2015
From: GLOBALFOUNDRIES U.S. 2 LLC; GLOBALFOUNDRIES U.S. INC.
To: GLOBALFOUNDRIES INC.
Reel/Frame 036779/0001 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 3, 2015
From: INTERNATIONAL BUSINESS MACHINES CORPORATION
To: GLOBALFOUNDRIES U.S. 2 LLC
Reel/Frame 036550/0001 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 30, 2010
From: ARNDT, RICHARD L.; CAIN, HAROLD W., III; FREY, BRADLY G.; MAY, CATHY
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 025067/0464 →
Continuity (1)
Related Publication 20120084477A1 · Apr 5, 2012