IP Library Granted Patent US 8,756,374
Granted Patent B2
US 8,756,374 · App. 12/940,929 · Granted Jun 17, 2014

Store queue supporting ordered and unordered stores

Inventors: Robert E. Cypher (Saratoga, CA); Haakan E. Zeffer (Lidingo, SE)
Assignee: Oracle International Corporation
G06F12/0802
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,756,374
App. No.
12/940,929
Granted
Jun 17, 2014
Kind
B2
Abstract

Some described embodiments provide a system that performs stores in a memory system. During operation, the system receives a store for a first thread. The system then creates an entry for the store in a store queue for the first thread. While creating the entry, the system requests a store-mark for a cache line for the store, wherein the store-mark for the cache line indicates that one or more store queue entries are waiting to be committed to the cache line. The system then receives a response to the request for the store-mark, wherein the response indicates that the cache line for the store is store-marked. Upon receiving the response, the system updates a set of ordered records for the first thread by inserting data for the store in the set of ordered records, wherein the set of ordered records include store-marked stores for the first thread.

Claims (59)

1. A method for performing a store in a memory system, comprising:

receiving a store for a first thread;

creating an entry for the store in a store queue for the first thread, wherein creating the entry involves requesting a store-mark for a cache line for the store, wherein the store-mark indicates that one or more store queue entries are waiting to be committed to the cache line;

receiving a response to the request for the store-mark, wherein the response indicates that the cache line is store-marked;

upon receiving the response to the request for the store-mark, updating a set of ordered records for the first thread by inserting data for the store in the set of ordered records, wherein the set of ordered records include one or more store-marked stores for the first thread; and

upon receiving a request to release the cache line, setting a flag for an unordered record for the cache line that comprises data for the cache line, wherein the flag indicates that, while the data remains in the unordered record and the flag is set, the data is not forwarded to a subsequent read-after-write request using the unordered record.

2. The method of claim 1 , wherein while creating the entry for the store in the store queue, if the cache line is not store-marked, the method further comprises updating the unordered record by inserting the data for the store in the unordered record,

wherein the unordered record includes one or more stores for the first thread for which a corresponding cache line is not store-marked.

3. The method of claim 2 , wherein while inserting the data for the store in the set of ordered records, if the ordered records include data from a previous store corresponding to an address for the store, inserting the data for the store in the set of ordered records involves merging the data for the store with the data from the previous store; and

wherein while inserting the data for the store in the unordered record, if the unordered record includes data from a previous store corresponding to an address for the store, inserting the data for the store in the unordered record involves merging the data for the store with the data from the previous store.

4. The method of claim 1 , wherein upon updating the set of ordered records, if the store is a most recent store for the cache line in the store queue, the method further comprises:

sending data for the cache line to be committed to memory;

removing records the cache line from the set of ordered records; and

releasing the store-mark for the cache line.

5. The method of claim 1 , further comprising receiving a read-after-write (RAW) request for data for the store; and

when the flag is not set, providing the data for the store to the RAW request using the unordered record.

6. The method of claim 1 , further comprising releasing the cache line by writing data to the cache line.

7. The method of claim 6 , wherein writing the data to the cache line comprises using the data for the store in the ordered record.

8. The method of claim 1 , further comprising:

receiving a read-after-write (RAW) request for the data for the store;

if the flag is not set, providing the data for the store to the RAW request using the unordered record; and

otherwise, if the flag is set, not providing the data for the store to the RAW request.

9. A processor that facilitates store-marking while performing a store in a memory system, comprising:

the processor configured to execute threads;

a store queue configured to buffer pending stores which are waiting to be committed to the memory system, wherein the store queue is configured to:

receive a store for a first thread, wherein responsive to receiving the store the store queue is configured to create an entry for the store and to request a store-mark for a cache line for the store, wherein the store-mark indicates that one or more store queue entries are waiting to be committed to the cache line;

receive a response to the request for the store-mark, wherein the response indicates that the cache line is store-marked;

responsive to receiving the response to the request for the store-mark, update a set of ordered records for the first thread by inserting data for the store in the set of ordered records, wherein the set of ordered records include one or more store-marked stores for the first thread; and

responsive to receiving a request to release the cache line, set a flag for an unordered record for the cache line that comprises data for the cache line, wherein the flag indicates that, while the data remains in the unordered record and the flag is set, the data is not forwarded to a subsequent read-after-write request using the unordered record.

10. The processor of claim 9 , wherein while creating the entry for the store, if the cache line is not store-marked, the store queue is further configured to update the unordered record by inserting the data for the store in the unordered record,

wherein the unordered record includes one or more stores for the first thread for which a corresponding cache line is not store-marked.

11. The processor of claim 10 , wherein while inserting the data for the store in the set of ordered records, if the ordered records include data from a previous store corresponding to an address for the store, the store queue is further configured to insert the data for the store in the set of ordered records by merging the data for the store with the data from the previous store; and

wherein while inserting the data for the store in the unordered record, if the unordered record includes data from a previous store corresponding to an address for the store, the store queue is configured to insert the data for the store in the unordered record by merging the data for the store with the data from the previous store.

12. The processor of claim 9 , wherein while updating the set of ordered records, if the store is a most recent store for the cache line in the store queue, the store queue is further configured to:

send data for the cache line to be committed to memory;

remove records the cache line from the set of ordered records; and

release the store-mark for the cache line.

13. The processor of claim 9 , wherein the store queue is further configured to:

receive a read-after-write (RAW) request for data for the store; and

when the flag is not set, provide the data for the store responsive to the RAW request using the unordered record.

14. A computer system that facilitates store-marking while performing a store in a memory system, comprising:

a processor configured to execute code for threads;

memory coupled to the processor;

a store queue configured to buffer pending stores which are waiting to be committed to the memory system, wherein the store queue is configured to:

receive a store for a first thread, wherein responsive to receiving the store the store queue is configured to create an entry for the store and to request a store-mark for a cache line for the store, wherein the store-mark indicates that one or more store queue entries are waiting to be committed to the cache line;

receive a response to the request for the store-mark, wherein the response indicates that the cache line is store-marked;

responsive to receiving the response to the request for the store-mark, update a set of ordered records for the first thread by inserting data for the store in the set of ordered records, wherein the set of ordered records include one or more store-marked stores for the first thread; and

responsive to receiving a request to release the cache line, set a flag for an unordered record for the cache line that comprises data for the cache line, wherein the flag indicates that, while the data remains in the unordered record and the flag is set, the data is not forwarded to a subsequent read-after-write request using the unordered record.

15. The computer system of claim 14 , wherein while creating the entry for the store, if the cache line is not store-marked, the store queue is further configured to update the unordered record by inserting the data for the store in the unordered record,

wherein the unordered record includes one or more stores for the first thread for which a corresponding cache line is not store-marked.

16. The computer system of claim 15 , wherein while inserting the data for the store in the set of ordered records, if the ordered records include data from a previous store corresponding to an address for the store, the store queue is further configured to insert the data for the store in the set of ordered records by merging the data for the store with the data from the previous store; and

wherein while inserting the data for the store in the unordered record, if the unordered record includes data from a previous store corresponding to an address for the store, the store queue is configured to insert the data for the store in the unordered record by merging the data for the store with the data from the previous store.

17. The computer system of claim 14 , wherein while updating the set of ordered records, if the store is a most recent store for the cache line in the store queue, the store queue is further configured to:

send data for the cache line to be committed to memory;

remove records the cache line from the set of ordered records; and

release the store-mark for the cache line.

18. The computer system of claim 14 , wherein the store queue is further configured to:

receive a read-after-write (RAW) request for data for the store; and

when the flag is not set, provide the data for the store responsive to the RAW request using the unordered record.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 4, 2011
From: CYPHER, ROBERT E.; ZEFFER, HAAKAN E.
To: ORACLE INTERNATIONAL CORPORATION
Reel/Frame 025581/0568 →
Continuity (1)
Related Publication 20120117323A1 · May 10, 2012