IP Library Granted Patent US 7,752,413
Granted Patent B2
US 7,752,413 · App. 11/567,882 · Granted Jul 6, 2010

Method and apparatus for communicating between threads

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 7,752,413
App. No.
11/567,882
Granted
Jul 6, 2010
Kind
B2
Abstract

A method and apparatus for communicating between threads in a processor. The method includes reserving a first portion of a cache in a processor for an inbox. The inbox is associated with a first thread being executed by the processor. The method also includes receiving a packet from a second thread, wherein the packet includes an access request. The method further includes using inbox control circuitry for the inbox to process the received packet and determine whether to grant the access request included in the packet.

Claims (61)

1. A method comprising:

reserving a first portion of a cache in a processor for an inbox, wherein the inbox is associated with a first thread being executed by the processor;

receiving a packet from a second thread, wherein the packet includes an access request; and

using inbox control circuitry for the inbox to process the received packet and determine whether to grant the access request included in the packet, wherein using inbox control circuitry for the inbox to determine whether to grant the access request included in the packet comprises:

using an allocation register for the inbox to determine whether the inbox includes memory space which is unreserved and which is sufficient to grant the access request; and

reserving a portion of the memory space in the inbox to fulfill the access request if the first portion of the cache includes unreserved memory space sufficient to grant the access request, wherein reserving a portion of the memory space in the inbox to fulfill the access request comprises increasing a value stored in the allocation register to indicate the portion of the memory space which is reserved.

2. The method of claim 1 , wherein direct access by loading or storing to memory addresses in the inbox is provided only to the first thread.

3. The method of claim 1 , wherein data stored at memory addresses in the inbox is non-cacheable.

4. The method of claim 1 , wherein no instructions are executed to determine whether to grant the access request.

5. The method of claim 1 , further comprising:

providing a notification to the first thread when an access corresponding to the access request is performed, wherein providing the notification comprises at least one of:

issuing an interrupt to the first thread in response to placing data for the access in the inbox;

issuing an interrupt to the first thread in response to a value being written to a doorbell register for the in box; and

setting one or more bits in a status register which is polled by the first thread.

6. The method of claim 1 , wherein the packet includes data for the access request which is placed in the inbox if the access request is granted and notification information which is used to notify the first thread if the access request is granted.

7. The method of claim 1 , wherein, in response to receiving the packet, an acknowledgment packet indicating whether the access request is granted is sent to an inbox for the second thread.

8. A method comprising:

allocating a first portion of a cache in a processor as an outbox for a first thread executed by the processor;

placing data from the first thread in the outbox;

using outbox control circuitry for the outbox to send the data placed in the outbox by the first thread as a packet to an inbox for a second thread; and

utilizing the outbox and inbox in ray tracing operations comprising:

traversing, with the first thread, a spatial index having nodes defining bounded volumes of the three dimensional scene by taking branches from internal nodes until a leaf node is reached, wherein branches are taken based on whether the ray intersects bounding volumes defined by the nodes;

recording a traversal history indicating one or more nodes defining bounding volumes the ray intersects and branches taken when traversing the spatial index; and

using outbox control circuitry for the first thread to send information defining the ray to the inbox of the second thread to perform ray-primitive intersection tests; and

using outbox control circuitry for the second thread to send results of the ray-primitive tests to the inbox of the first thread.

9. The method of claim 8 , wherein the packet further includes an access request to write the data to the inbox and notification information for the second thread.

10. The method of claim 8 , further comprising:

removing the data from the outbox after the outbox circuitry receives an acknowledgement packet in response to the packet sent by the outbox control circuitry indicating that the data in the packet was written to the in box for the second thread.

11. The method of claim 8 , further comprising:

maintaining the data in the outbox until the outbox circuitry receives an acknowledgement packet in response to the packet sent by the outbox control circuitry indicating that the data in the packet was written to the in box for the second thread; and

responsive to receiving an acknowledgment packet in response to the packet sent by the outbox control circuitry indicating that the data in the packet was not written to the in box for the second thread, resending the packet.

12. The method of claim 11 , wherein the outbox control circuitry uses a randomly generated wait interval to wait before resending the packet.

13. The method of claim 8 , further comprising:

receiving an acknowledgment packet in response to the packet sent by the outbox control circuitry indicating a priority for an access request in the packet.

14. The method of claim 8 , wherein data stored in memory addresses in the outbox is non-cacheable.

15. The method of claim 8 , wherein placing data from the first thread in the outbox comprises performing a local store by the first thread.

16. The method of claim 8 , wherein the second thread is executed by the processor.

17. The method of claim 8 , wherein the ray tracing operations further comprise:

if the results of the ray-primitive intersection tests indicate the ray does not hit a primitive contained in the bounding volume defined by the leaf node, re-traversing the spatial index using the recorded traversal history.

18. A processor comprising:

a processor cache; and

inbox control circuitry configured to:

reserve a first portion of the processor cache for an inbox, wherein the inbox is associated with a first thread being executed by the processor;

receive a packet from a second thread, wherein the packet includes an access request; and

process the received packet and determine whether to grant the access request included in the packet,

wherein, when determining whether to grant the access request included in the packet, the inbox control circuitry is configured to:

use an allocation register for the inbox to determine whether the inbox includes memory space which is unreserved and which is sufficient to grant the access request; and

reserve a portion of the memory space in the inbox to fulfill the access request if the first portion of the cache includes unreserved memory space sufficient to grant the access request, wherein reserving a portion of the memory space in the inbox to fulfill the access request comprises increasing a value stored in the allocation register to indicate the portion of the memory space which is reserved.

19. The processor of claim 18 , wherein the inbox control circuitry is further configured to provide direct access by loading or storing to memory addresses in the inbox only to the first thread.

20. The processor of claim 18 , wherein data stored at memory addresses in the inbox is non-cacheable.

21. The processor of claim 18 , wherein no instructions are executed to determine whether to grant the access request.

22. The processor of claim 18 , wherein the inbox control circuitry is further configured to:

provide a notification to the first thread when an access corresponding to the access request is performed, wherein providing the notification comprises at least one of:

issuing an interrupt to the first thread in response to placing data for the access in the inbox;

issuing an interrupt to the first thread in response to a value being written to a doorbell register for the in box; and

setting one or more bits in a status register which is polled by the first thread.

23. The processor of claim 18 , wherein the packet includes data for the access request and notification information, and wherein the in box control circuitry is further configured to:

place the data in the inbox if the access request is granted; and

provide the notification information to the first thread if the access request is granted.

24. The processor of claim 18 , wherein, in response to receiving the packet, the inbox control circuitry is configured to:

send an acknowledgment packet indicating whether the access request is granted an inbox for the second thread.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 7, 2006
From: HOOVER, RUSSELL DEAN; KRIEGEL, JON K.; MEJDRICH, ERIC OLIVER; SHEARER, ROBERT ALLEN
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 018596/0182 →
Continuity (2)
Continuation In Part 1146079700 · Jul 28, 2006
Related Publication 20080028403A1 · Jan 31, 2008