IP Library Granted Patent US 8,019,944
Granted Patent B1
US 8,019,944 · App. 12/030,862 · Granted Sep 13, 2011

Checking for a memory ordering violation after a speculative cache write

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,019,944
App. No.
12/030,862
Granted
Sep 13, 2011
Kind
B1
Abstract

An embodiment of the present invention includes a circuit for tracking memory operations with trace-based execution. Each trace includes a sequence of operations that includes zero or more of the memory operations. The memory operations being executed form a set of active memory operations that have a predefined program order among them and corresponding ordering constraints. At least some of the active memory operations access the memory in an execution order that is different from the program order. Checkpoint entries are associated with each trace. Violations of the ordering constraints may be signaled too late to prevent an update of the cached data associated with the memory operations. A sub-circuit detects this condition and invalidates the checkpoint locations indicated by the checkpoint entries associated with the trace experiencing the violation and all younger traces.

Claims (23)

1. A circuit for tracking memory operations in an out-of-order and speculative processor,

wherein the circuit is adapted for use with a trace unit and with an execution unit of the processor, where the trace unit sequences traces for execution thereby forming a trace sequence order, where each of the traces includes a sequence of operations that includes zero or more of the memory operations, where the execution unit executes the operations, and where the circuit comprises:

a first memory configured to cache at least some of the data accessed by the memory operations, where the memory operations being executed form a set of active memory operations,

wherein the active memory operations have a predefined program order among themselves, where the predefined program order imposes a set of ordering constraints, where at least some of the active memory operations access the memory in an execution order that is different from the predefined program order, and where the first memory is partitioned into cache lines and participates in a cache coherency protocol;

a second memory configured to receive and hold a set of checkpoint entries,

wherein each checkpoint entry is associated with one of the traces, where each checkpoint entry is of a checkpoint location within the first memory, where each checkpoint entry includes checkpoint data indicating a state of the checkpoint location within the first memory prior to an update of the checkpoint location, and where the update results from executing one of the active memory operations;

a first sub-circuit configured to hold a memory operation ordering entry corresponding to each one of the active memory operations,

wherein the memory operation ordering entry includes an indication of the trace associated with the corresponding active memory operation,

wherein the first sub-circuit is further configured to detect a violation of the ordering constraints, where the violation occurs between at least two of the active memory operations,

wherein the first sub-circuit is further configured to generate, in response to the detection, a memory ordering violation signal that includes an indication of at least one of the one or more traces corresponding to the at least two active memory operations involved in the violation, and where at least some occurrences of the memory ordering violation signal are too late to prevent the update of the first memory; and

a second sub-circuit configured to receive the memory ordering violation signal and to determine whether a particular occurrence of the memory ordering violation signal was too late to prevent the updating and, if so, to overwrite in the first memory a set of the checkpoint locations based on a selected one of the particular traces,

wherein the set of checkpoint locations includes all checkpoint locations of all checkpoint entries associated with the selected trace, and where the set of checkpoint locations further includes all checkpoint locations of all checkpoint entries associated with any traces that are younger than the selected trace.

2. The circuit of claim 1 , where:

the memory is further configured to cache at least some of the active memory operations that are the cacheable type; and

the sub-circuit is further configured to hold operation ordering information for the at least some of the active memory operations.

3. The circuit of claim 1 , where:

the active memory operations include all memory operations being executed that are a write combining type of memory operation; and

the first memory is further configured to hold operation ordering information for each one of the active memory operations that is of the write combining type.

4. The circuit of claim 1 , where:

none of the operations of a particular one of the traces has any effect on the architectural state prior to a commitment of the first particular trace, and where the first particular trace becomes eligible for the commitment after the execution completes for all operations of the first particular trace; and

none of the operations of a particular one of the traces has any effect on the architectural state, provided that the particular trace does abort.

5. The circuit of claim 1 , where the execution of the operations of a particular one of the traces can complete in such a way that a first subset of the operations of the particular trace affect the architectural state and that a second subset of the operations of the particular trace do not affect the architectural state.

6. The circuit of claim 1 , where the operation sequences of a set of at least two of the traces are executed concurrently by the execution unit, where the active memory operations include a memory operation from a first particular one of the set, and where the active memory operations include a memory operation from a second particular one of the set.

Assignments (3)
CORRECTIVE ASSIGNMENT TO CORRECT THE ASSIGNEE PREVIOUSLY RECORDED ON REEL 020957 FRAME 0434. ASSIGNOR(S) HEREBY CONFIRMS THE CORRECT ASSIGNEES ARE SUN MICROSYSTEMS, INC. AND SUN MICROSYSTEMS TECHNOLOGY LTD. Recorded Aug 23, 2011
From: MONTALVO SYSTEMS, INC.
To: SUN MICROSYSTEMS, INC.; SUN MICROSYSTEMS TECHNOLOGY LTD.
Reel/Frame 026794/0962 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 16, 2008
From: MONTALVO SYSTEMS, INC.
To: SUN MICROSYSTEMS, INC.
Reel/Frame 020957/0434 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 23, 2008
From: FAVOR, JOHN GREGORY; CHAN, PAUL G.; MURPHY, GRAHAM RICKETSON; ROWLANDS, JOSEPH BYRON
To: MONTALVO SYSTEMS, INC.
Reel/Frame 020847/0296 →