IP Library › Granted Patent US 9,256,461
Granted Patent B2
US 9,256,461 · App. 14/030,366 · Granted Feb 9, 2016

Handling interrupt actions for inter-thread communication

Inventors: Andrew J. Declercq (Austin, TX); Ahmed Gheith (Austin, TX); Aditya Kumar (Austin, TX)
Assignee: International Business Machines Corporation
G06F9/4812G06F9/52G06F9/542
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 9,256,461
App. No.
14/030,366
Granted
Feb 9, 2016
Kind
B2
Abstract

A mechanism is provided for handling interrupt actions for inter-thread communication. In association with a first processor thread, a thread action data structure is provided that comprises a non-blocking synchronization data structure and an internal list data structure of pending interrupts having no form of synchronization. A post of an interrupt action is received from a second processor thread to the thread action data structure associated with the first processor thread, where the interrupt action is added to the non-blocking synchronization data structure of the thread action data structure. The interrupt action is moved from the non-blocking synchronization data structure to the internal list data structure of pending interrupts for handling by the first processor thread. The internal list data structure of pending interrupts is processed to thereby handle interrupt actions moved to the internal list data structure.

Claims (40)

1. A computer program product comprising a non-transitory computer recordable storage medium having a computer readable program stored therein, wherein the computer readable program, when executed on a computing device, causes the computing device to:

provide in association with a first processor thread, a thread action data structure comprising a non-blocking synchronization data structure and an internal list data structure of pending interrupts, wherein the thread action data structure associated with the first processor thread receives interrupts from other processor threads in the computing device;

receive a post of an interrupt action from a second processor thread to the thread action data structure associated with the first processor thread, wherein the interrupt action is added to the non-blocking synchronization data structure of the thread action data structure;

move the interrupt action from the non-blocking synchronization data structure to the internal list data structure of pending interrupts for handling by the first processor read, wherein, responsive to receiving a post of a new interrupt action while the interrupt action is being moved from the non-blocking synchronization data structure to the internal list data structure of pending interrupts, the computer readable program further causes the computing device to:

delay the posting of the new interrupt action to the non-blocking synchronization data structure until after the interrupt action is moved from the non-blocking synchronization data structure to the internal list data structure of pending interrupts;

responsive to the interrupt action being moved from the non-blocking synchronization data structure to the internal list data structure of pending interrupts, add the new interrupt action to the non-blocking synchronization data structure of the thread action data structure; and

update a atomic reference to a head of the non-blocking synchronization data structure in response adding the new interrupt action from the second processor thread to the thread action data structure associated with the first processor thread, wherein the atomic reference to the head of the non-blocking synchronization data structure points to the new interrupt action in the non-blocking synchronization data structure; and

process the internal list data structure of pending interrupts to thereby handle interrupt actions moved to the internal list data structure.

2. The computer program product of claim 1 , wherein the computer readable program to move the interrupt action from the non-blocking synchronization data structure to the internal list data structure of pending interrupts for handling by the first processor thread further causes the computing device to:

advance an atomic reference to a next most recently posted interrupt action in the non-blocking synchronization data structure in response to moving the interrupt action from the non-blocking synchronization data structure to the internal list data structure of pending interrupts for handling by the first processor thread.

3. The computer program product of claim 1 , wherein the computer readable program further causes the computing device to:

block posting of interrupt actions by other threads to the non-blocking synchronization data structure while the interrupt action is being moved from the non-blocking synchronization data structure to the internal list data structure of pending interrupts.

4. The computer program product of claim 1 , wherein the computer readable program further causes the computing device to:

update the atomic reference to the head of the non-blocking synchronization data structure in response to receiving the post of the interrupt action from the second processor thread to the thread action data structure associated with the first processor thread, wherein the atomic reference points to the interrupt action from the second processor thread in the non-blocking synchronization data structure.

5. The computer program product of claim 1 , wherein the computer readable program further causes the computing device to:

periodically check the atomic reference to the head of the non-blocking synchronization data structure to determine whether there are any pending interrupt actions in the non-blocking synchronization data structure; and

responsive to determining that there are pending interrupt actions in the non-blocking synchronization data structure based on results of checking the atomic reference to the head, move the interrupt action from the non-blocking synchronization data structure to the internal list data structure of pending interrupts for handling by the first processor thread.

6. The computer program product of claim 1 , wherein the computer readable program further causes the computing device to:

provide in association with all processor threads in the data processing system, a respective thread action data structure comprising a respective non-blocking synchronization data structure and a respective internal list data structure of pending interrupts.

7. 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:

provide in association with a first processor thread, a thread action data structure comprising a non-blocking synchronization data structure and an internal list data structure of pending interrupts, wherein the thread action data structure associated with the first processor thread receives interrupts from other processor threads in the computing device;

receive a post of an interrupt action from a second processor thread to the thread action data structure associated with the first processor thread, wherein the interrupt action is added to the non-blocking synchronization data structure of the thread action data structure;

move the interrupt action from the non-blocking synchronization data structure to the internal list data structure of pending interrupts for handling by the first processor thread, wherein, responsive to receiving a post of a new interrupt action while the interrupt action is being moved from the non-blocking synchronization data structure to the internal list data structure of pending interrupts, the instructions further cause the processor to:

delay the posting of the new interrupt action to the non-blocking synchronization data structure until after the interrupt action is moved from the non-blocking synchronization data structure to the internal list data structure of pending interrupts;

responsive to the interrupt action being moved from the non-blocking synchronization data structure to the internal list data structure of pending interrupts, add the new interrupt action to the non-blocking synchronization data structure of the thread action data structure; and

update an atomic reference to a head of the non-blocking synchronization data structure in response adding the new interrupt action from the second processor thread to the thread action data structure associated with the first processor thread, wherein the atomic reference to the head of the non-blocking synchronization data structure points to the new interrupt action in the non-blocking synchronization data structure; and

process the internal list data structure of pending interrupts to thereby handle interrupt actions moved to the internal list data structure.

8. The apparatus of claim 7 , wherein the instructions to move the interrupt action from the non-blocking synchronization data structure to the internal list data structure of pending interrupts for handling by the first processor thread further cause the processor to:

advance an atomic reference to a next most recently posted interrupt action in the non-blocking synchronization data structure in response to moving the interrupt action from the non-blocking synchronization data structure to the internal list data structure of pending interrupts for handling by the first processor thread.

9. The apparatus of claim 7 , wherein the instructions further cause the processor to:

block posting of interrupt actions by other threads to the non-blocking synchronization data structure while the interrupt action is being moved from the non-blocking synchronization data structure to the internal list data structure of pending interrupts.

10. The apparatus of claim 7 , wherein the instructions further cause the processor to:

update the atomic reference to the head of the non-blocking synchronization data structure in response to receiving the post of the interrupt action from the second processor thread to the thread action data structure associated with the first processor thread, wherein the atomic reference points to the interrupt action from the second processor thread in the non-blocking synchronization data structure.

11. The apparatus of claim 7 , wherein the instructions further cause the processor to:

periodically check the atomic reference to the head of the non-blocking synchronization data structure to determine whether there are any pending interrupt actions in the non-blocking synchronization data structure; and

responsive to determining that there are pending interrupt actions in the non-blocking synchronization data structure based on results of checking the atomic reference to the head, move the interrupt action from the non-blocking synchronization data structure to the internal list data structure of pending interrupts for handling by the first processor thread.

12. The apparatus of claim 7 , wherein the instructions further cause the processor to:

provide in association with all processor threads in the data processing system, a respective thread action data structure comprising a respective non-blocking synchronization data structure and a respective internal list data structure of pending interrupts.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 18, 2013
From: DECLERCQ, ANDREW J.; GHEITH, AHMED; KUMAR, ADITYA
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 031232/0423 →
Continuity (1)
Related Publication 20150082324A1 · Mar 19, 2015