Method and apparatus for processing events in a multithreaded processor
First Claim
1. A processor comprising:
- retirement logic from which microinstructions for both a first thread and a second thread being processed within the processor are retired; and
an event detector, coupled to the retirement logic, to detect an event for the first thread;
responsive to the detection of the event, to determine whether to execute a first state clearing process or a second state clearing process; and
to execute either the first state clearing process or the second state clearing process, depending on the event.
1 Assignment
0 Petitions
Accused Products
Abstract
In a multithreaded processor, events are categorized according to which of a “soft” state clearing (“nuke”) process and a “hard” nuke process should be performed in response to each event. When an event is detected for a thread, either the soft nuke or hard nuke process is executed, according to the type of event, prior to invoking an event handler. The soft nuke process performs less than all of the actions performed by the hard nuke process and requires much less time to execute. If multiple threads are being processed, the hard nuke process requires synchronization between the threads and clears state for each thread, whereas the soft nuke process does not require cross-thread synchronization and clears state only for the thread in which the event was detected. In one embodiment, the soft nuke process is implemented in microcode, while the hard nuke process is hardware-implemented.
-
Citations
61 Claims
-
1. A processor comprising:
-
retirement logic from which microinstructions for both a first thread and a second thread being processed within the processor are retired; and
an event detector, coupled to the retirement logic, to detect an event for the first thread;
responsive to the detection of the event, to determine whether to execute a first state clearing process or a second state clearing process; and
to execute either the first state clearing process or the second state clearing process, depending on the event. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)
-
-
16. A microprocessor comprising:
-
means for detecting an event for a first thread being processed in the microprocessor, the microprocessor also having a second thread being processed concurrently with the first thread;
means for determining, in response to detecting the event, whether a first state clearing process is to be used responsive to the event; and
means for executing the first state clearing process if the first state clearing process is to be used responsive to the event, the first state clearing process clearing state for only the first thread, and for executing the second state clearing process if the second state clearing process is to be used responsive to the event, the second state clearing process clearing state for both the first thread and the second thread. - View Dependent Claims (17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30)
-
-
31. A machine-readable storage medium storing instructions which, when executed by a multithreaded processor, cause the processor to perform a method comprising:
-
detecting an event for a first thread being processed in the multithreaded processor, the multithreaded processor also having a second thread being processed concurrently with the first thread;
in response to detecting the event, determining whether a first state clearing process is to be used responsive to the event;
if the first state clearing process is to be used responsive to the event, then executing the first state clearing process, the first state clearing process clearing state for only the first thread; and
if the first state clearing process is not to be used responsive to the event occurrence, then executing a second state clearing process responsive to the event, the second state clearing process clearing state for both the first thread and the second thread. - View Dependent Claims (32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45)
-
-
46. A method comprising:
-
categorizing a plurality of events that can occur in a multithreaded processor according to which of a plurality of state clearing processes is to be performed in response to each event, the plurality of state clearing processes including a first state clearing process and a second state clearing process, the first state clearing process to clear state for only one of a plurality of threads being processing concurrently in the processor, the second state clearing process to clear state for at least two of said plurality of threads;
in response to detecting an event in the processor, determining whether to execute the first state clearing process or the second state clearing process, according to a type of the event; and
executing either the first state clearing process or the second state clearing process, according to the outcome of said determining. - View Dependent Claims (47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 61)
-
-
59. A method comprising:
-
categorizing a plurality of events which may occur in a multithreaded processor according to which of a plurality of state clearing processes can be performed in response to each event, each of the plurality of state clearing processes capable of execution in the multithreaded processor, the plurality of state clearing processes including a software-implemented state clearing process and a hardware-implemented state clearing process, the software-implemented state clearing process including a first plurality of actions and the hardware implemented state clearing process including a second plurality of actions, the first plurality of actions being a partial subset of the second plurality of actions, wherein the software-implemented state clearing process requires substantially less time to execute than the hardware-implemented state clearing process;
detecting an event for a first thread being processed in the multithreaded processor, the multithreaded processor also having a second thread being processed concurrently with the first thread;
in response to detecting the event, determining whether the software implemented state clearing process can be used responsive to the event;
if the software-implemented state clearing process can be used responsive to the event, then executing the software-implemented state clearing process, including clearing state in the multithreaded processor for the first thread but not the second thread, wherein said clearing state for the first thread is done independently of the second thread;
if the software-implemented state clearing process cannot be used responsive to the event occurrence, then executing the hardware-implemented state clearing process responsive to the event, the hardware-implemented state clearing process including monitoring the second thread to detect a clearing point for the second thread, and in response to detection of the clearing point for the second thread, clearing state within the multithreaded processor for both the first thread and the second thread;
and invoking an event handler to service the event after executing the software-implemented state clearing process or the hardware-implemented state clearing process. - View Dependent Claims (60)
-
Specification