IP Library Granted Patent US 7,836,281
Granted Patent B1
US 7,836,281 · App. 11/245,774 · Granted Nov 16, 2010

Continuing execution in scout mode while a main thread resumes normal execution

Assignee: Oracle America, Inc.
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,836,281
App. No.
11/245,774
Granted
Nov 16, 2010
Kind
B1
Abstract

A system that facilitates improving performance of a processor during scout mode. During a normal-execution mode, the system executes instructions for using main thread. Upon encountering a stall condition during execution of the main thread, the system generates a checkpoint. The system then enters a scout mode, wherein instructions are speculatively executed by a speculative thread to prefetch future memory references, but results are not committed to the architectural state of the processor. Upon encountering a memory reference during scout mode, the system issues a prefetch for the memory reference. If the stall condition that caused the processor to enter scout mode is resolved, the system uses the checkpoint to resume execution of the main thread from the instruction that caused the stall condition, and simultaneously continues executing instructions in scout mode using the speculative thread from the point where the speculative thread left off.

Claims (68)

1. A method for improving performance of a processor, comprising:

executing instructions for a main thread;

upon encountering a non-data dependent stall condition during execution of the main thread, wherein the non-data dependent stall condition includes a deferred buffer full condition,

generating a checkpoint, which includes an architectural state of the processor,

entering scout mode, wherein instructions are speculatively executed by a speculative thread to prefetch future memory references, but results are not committed to the architectural state of the processor, wherein both the main thread and the speculative thread are associated with a single software thread, and

upon encountering a memory reference during scout mode, issuing a prefetch for the memory reference; and

wherein if the stall condition that caused the processor to enter scout mode is resolved, the method further comprises,

using the checkpoint to resume execution of the main thread from the instruction that caused the stall condition, wherein the processor reexecutes instructions executed during scout mode, and wherein results of the instructions executed during scout mode are not reused, and

simultaneously continuing execution of instructions in scout mode using the speculative thread from the point where the speculative thread left off while the processor executes instructions in the main thread.

2. The method of claim 1 , wherein when the main thread encounters a second stall condition, the method further comprises:

generating a checkpoint; and

re-launching the speculative thread in scout mode from the instruction that caused the second stall condition.

3. The method of claim 1 , wherein upon encountering an unresolved data dependency during execution of the main thread, the method further comprises:

generating a checkpoint; and

executing subsequent instructions in an execute-ahead mode, wherein instructions that cannot be executed because of an unresolved data dependency are deferred, and wherein other non-deferred instructions are executed in program order; and

when the unresolved data dependency is resolved during execute-ahead mode, the method further comprises:

executing deferred instructions in a deferred-execution mode;

simultaneously executing instructions in scout mode using the speculative thread from the point where the execute-ahead mode left off; and

if all deferred instructions are executed, returning to the normal-execution mode to resume normal program execution from the point where the execute-ahead mode left off.

4. The method of claim 1 , further comprising interleaving execution of instructions between the speculative thread and the main thread.

5. The method of claim 1 , wherein the processor maintains a first program counter for the main thread and a second program counter for the speculative thread.

6. The method of claim 1 , wherein the processor supports simultaneous multithreading or vertical multithreading.

7. An apparatus for improving performance of a processor, comprising:

a processor which is configured to:

execute instructions for a main thread;

upon encountering a non-data dependent stall condition during execution of the main thread, wherein the non-data dependent stall condition includes a deferred buffer full condition, to

generate a checkpoint, which includes an architectural state of the processor,

enter scout mode, wherein instructions are speculatively executed by a speculative thread to prefetch future memory references, but results are not committed to the architectural state of the processor, wherein both the main thread and the speculative thread are associated with a single software thread, and

upon encountering a memory reference during scout mode, to issue a prefetch for the memory reference; and

wherein if the stall condition that caused the processor to enter scout mode is resolved, the processor is configured to,

use the checkpoint to resume execution of the main thread from the instruction that caused the stall condition, wherein the processor reexecutes instructions executed during scout mode, and wherein results of the instructions executed during scout mode are not reused, and to

simultaneously continue execution of instructions in scout mode using the speculative thread from the point where the speculative thread left off while the processor executes instructions in the main thread.

8. The apparatus of claim 7 , wherein when the main thread encounters a second stall condition, the processor is configured to:

generate a checkpoint; and to

re-launch the speculative thread in scout mode from the instruction that caused the second stall condition.

9. The apparatus of claim 7 , wherein upon encountering an unresolved data dependency during execution of the main thread, the processor is configured to:

generate a checkpoint, and to

execute subsequent instructions in an execute-ahead mode, wherein instructions that cannot be executed because of an unresolved data dependency are deferred, and wherein other non-deferred instructions are executed in program order, and

when the unresolved data dependency is resolved during execute-ahead mode, the processor is configured to,

execute deferred instructions in a deferred-execution mode,

simultaneously execute instructions in scout mode using the speculative thread from the point where the execute-ahead mode left off, and

if all deferred instructions are executed, to return to the normal-execution mode to resume normal program execution from the point where the execute-ahead mode left off.

10. The apparatus of claim 7 , wherein the processor is configured to interleave execution of instructions between the speculative thread and the main thread.

11. The apparatus of claim 7 , wherein the processor is configured to maintain a first program counter for the main thread and a second program counter for the speculative thread.

12. The apparatus of claim 7 , wherein the processor is configured to support simultaneous multithreading or vertical multithreading.

13. A computer system for improving performance of a processor, comprising:

a processor which is configured to,

execute instructions for a main thread;

upon encountering a non-data dependent stall condition during execution of the main thread, wherein the non-data dependent stall condition includes a deferred buffer full condition, to

generate a checkpoint, which includes an architectural state of the processor,

enter scout mode, wherein instructions are speculatively executed by a speculative thread to prefetch future memory references, but results are not committed to the architectural state of the processor, wherein both the main thread and the speculative thread are associated with a single software thread, and

upon encountering a memory reference during scout mode, to issue a prefetch for the memory reference, and

wherein if the stall condition that caused the processor to enter scout mode is resolved, the processor is configured to:

use the checkpoint to resume execution of the main thread from the instruction that caused the stall condition, wherein the processor reexecutes instructions executed during scout mode, and wherein results of the instructions executed during scout mode are not reused, and to

simultaneously continue execution of instructions in scout mode using the speculative thread from the point where the speculative thread left off while the processor executes instructions in the main thread.

14. The computer system of claim 13 , wherein when the main thread encounters a second stall condition, the processor is configured to:

generate a checkpoint; and to

re-launch the speculative thread in scout mode from the instruction that caused the second stall condition.

15. The computer system of claim 13 , wherein upon encountering an unresolved data dependency during execution of the main thread, the processor is configured to:

generate a checkpoint; and to

execute subsequent instructions in an execute-ahead mode, wherein instructions that cannot be executed because of an unresolved data dependency are deferred, and wherein other non-deferred instructions are executed in program order, and

when the unresolved data dependency is resolved during execute-ahead mode, the processor is configured to,

execute deferred instructions in a deferred-execution mode,

simultaneously execute instructions in scout mode using the speculative thread from the point where the execute-ahead mode left off, and

if all deferred instructions are executed, to return to the normal-execution mode to resume normal program execution from the point where the execute-ahead mode left off.

16. The computer system of claim 13 , wherein the processor is configured to interleave execution of instructions between the speculative thread and the main thread.

17. The computer system of claim 13 , wherein the processor is configured to maintain a first program counter for the main thread and a second program counter for the speculative thread.

18. The computer system of claim 13 , wherein the processor is configured to support simultaneous multithreading or vertical multithreading.

Assignments (2)
MERGER AND CHANGE OF NAME Recorded Aug 31, 2016
From: ORACLE USA, INC.; SUN MICROSYSTEMS, INC.; ORACLE AMERICA, INC.
To: ORACLE AMERICA, INC.
Reel/Frame 039604/0471 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 6, 2005
From: TREMBLAY, MARC; CHAUDHRY, SHAILENDER
To: SUN MCIROSYSTEMS, INC.
Reel/Frame 017076/0110 →
Continuity (1)
Continuation In Part 1068606100 · Oct 14, 2003