IP Library Granted Patent US 7,024,520
Granted Patent B2
US 7,024,520 · App. 10/263,740 · Granted Apr 4, 2006

System and method enabling efficient cache line reuse in a computer system

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,024,520
App. No.
10/263,740
Granted
Apr 4, 2006
Kind
B2
Abstract

A system permits unacknowledged write backs in a computer. The computer has a plurality of processors and a shared memory. The shared memory stores data in terms of memory blocks, and each processor has a cache. Associated with each cache line is a tag containing the address of the block at that line, and its state. A duplicate copy of the tag information (DTAG) for each processor cache is also provided, and each section of the DTAG that corresponds to a given processor is organized into a primary DTAG region and a secondary DTAG region. The secondary DTAG region preferably stores tag information for a dirty version of a block, while the write back of the block is in flight to memory. This frees the primary DTAG region to store tag information for a block other than the dirty block, but using the same cache line.

Claims (54)

1. An apparatus for use with a computer system having a plurality of processors and a shared memory accessible by the processors, the shared memory organized into a plurality of memory blocks, each processor having a cache with a plurality of lines for storing selected memory blocks, the apparatus comprising:

a duplicate tag (DTAG) that holds information for a given processor, the DTAG having first and second regions, each of the first and second regions having a plurality of entries, and each entry of each region stores an address and one or more states for a cache line at the given processor, whereby for each of a plurality of cache lines at the given processor there is a matching entry in both the first and the second DTAG regions; and

a controller operatively coupled to the DTAG, wherein

the controller loads the address and the one or more states into the DTAG entries of the first and second regions, and

for each of two or more cache lines, the address loaded into the two matching entries at the first and second regions is different.

2. The apparatus of claim 1 wherein the controller loads the DTAG entries of the first and second regions in response to memory reference operations issued by the processors.

3. The apparatus of claim 1 wherein

the one or more states of the memory blocks stored in the processor caches include a dirty state and a clean state, and

the controller, in response to a memory reference operation for write access to a first memory block, identifies the entry of the first DTAG region matching the cache line at which the first memory block is to be stored, loads the identified entry with the address of the first memory block and marks the state as dirty.

4. The apparatus of claim 3 wherein

the one or more states of the memory blocks stored in the processor caches include a dirty state and a clean state, and

the controller, in response to a memory reference operation targeting a first memory block, identifies the entry of the first DTAG region matching the cache line at which the first memory block is to be stored, and, provided that the identified entry currently stores the address of a second memory block in the dirty state, copies the address and the one or more states of the second memory block from the matching entry at the first DTAG region into the matching entry at the second DTAG region.

5. The apparatus of claim 4 wherein the controller loads the address and the one or more states of the first memory block in the identified entry of the first DTAG region.

6. The apparatus of claim 5 wherein a given processor, upon writing back to the shared memory a first memory block in the dirty state from a selected cache line, issues a memory reference operation for a second memory block to be stored in the selected cache line, free from waiting for an acknowledgment to the write back.

7. The apparatus of claim 1 wherein

the one or more states of the memory blocks stored in the processor caches include a dirty state and a clean state, and

a given processor, upon writing back to the shared memory a first memory block in the dirty state from a selected cache line, issues a memory reference operation for a second memory block to be stored in the selected cache line, free from waiting for an acknowledgment to the write back.

8. The apparatus of claim 6 wherein the DTAG is stored at the shared memory.

9. The apparatus of claim 6 wherein the shared memory utilizes the DTAG to maintain coherence over cached memory blocks.

10. The apparatus of claim 6 wherein the processor caches are one of direct-mapped, associative, and set-associative caches.

11. A method for use with a computer system having a plurality of processors and a shared memory accessible by the processors, the shared memory organized into a plurality of memory blocks, each processor having a cache organized into a plurality of lines for storing selected memory blocks, the method comprising:

providing a duplicate tag (DTAG) for the cache of a given processor;

providing two separate entries in the DTAG for each cache line; and

for a given cache line, entering a first address in the first DTAG entry for the given cache line, and a second address in the second DTAG entry for the given cache line, whereby

the first and second addresses are different.

12. The method of claim 11 further comprising:

in response to a memory reference operation for read access to a first memory block, identifying a first DTAG entry for the cache line at which the first memory block is to be stored;

loading the identified first DTAG entry with an address corresponding to the first memory block; and

setting a state at the identified first DTAG entry to a clean state.

13. The method of claim 12 further comprising:

in response to a memory reference operation targeting a second memory block, identifying the first and second DTAG entries for the cache line at which the second memory block is to be stored;

in response to the identified first DTAG entry currently storing the address of a third memory block in a dirty state, copying the address and the state of the third memory block from the first DTAG entry to the second DTAG entry for the cache line; and

loading the address and the state of the second memory block into the identified first DTAG entry for the cache line.

14. The method of claim 11 further comprising:

in response to a memory reference operation issued by a source processor and targeting a first memory block, identifying the first and second DTAG entries for the cache line at which the first memory block is to be stored; and

in response to both the first and second DTAG entries currently storing an address of a memory block in a dirty state, issuing a retry command to the source processor, the retry command directing the source processor to issue another memory reference operation for the first memory block.

15. The method of claim 11 further comprising:

writing back to the shared memory a first memory block in a dirty state from a selected cache line; and

issuing a memory reference operation for a second memory block to be stored in the selected cache line, wherein the issuing is preformed free from waiting for an acknowledgment to the write back.

16. The method of claim 11 further comprising:

writing back from a source processor to the shared memory a first memory block in a dirty state;

issuing a memory reference operation from the source processor for the first memory block;

detecting whether the memory reference operation is received at the shared memory ahead of the write back; and

issuing a retry to the source processor, provided that the memory reference operation is determined to have been received ahead of the write back.

17. The method of claim 16 wherein the source processor, in response to the retry, issues another memory reference operation for the first memory block.

18. The method of claim 16 wherein detecting comprises determining that at least one of the DTAG entries corresponding to the source processor indicates that the source processor has a copy of the first memory block in a dirty and a valid state.

19. The method of claim 11 further comprising:

providing a DTAG for each processor, each DTAG having two separate entries for each cache line;

in response to a memory reference operation from a first processor specifying a first memory block, searching both entries of the DTAG for each processor for an address match to the first memory block;

identifying two DTAG entries corresponding to the same cache line at a second processor whereby one identified entry has an address match to the first memory block and indicates that the first memory block is in a dirty state at the second processor, and the other identified entry indicates a different memory block is at the same cache line at the second processor; and

issuing a snoop to the first processor targeting the first memory block.

20. The method of claim 19 further comprising:

determining that the snoop misses at the cache of the second processor; and

employing a late-race resolution mechanism to provide the first memory block to the first processor in response to the memory reference operation.

Assignments (3)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 11, 2011
From: HEWLETT-PACKARD DEVELOPMENT COMPANY, L.P.; HEWLETT-PACKARD COMPANY
To: SAMSUNG ELECTRONICS CO., LTD.
Reel/Frame 026008/0690 →
CHANGE OF NAME Recorded May 12, 2004
From: COMPAQ INFORMATION TECHNOLOGIES GROUP LP
To: HEWLETT-PACKARD DEVELOPMENT COMPANY, L.P.
Reel/Frame 014628/0103 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 2, 2002
From: TIERNEY, GREGORY E.; VAN DOREN, STEPHEN R.
To: COMPAQ INFORMATION TECHNOLOGIES GROUP, LLP
Reel/Frame 013543/0155 →