IP Library Granted Patent US 9,378,153
Granted Patent B2
US 9,378,153 · App. 14/011,616 · Granted Jun 28, 2016

Early write-back of modified data in a cache memory

Inventors: Syed Ali Jafri (Sunnyvale, CA); Yasuko Eckert (Kirkland, WA); Srilatha Manne (Portland, OR)
Assignee: ADVANCED MICRO DEVICES, INC.
G06F12/127G06F12/0804G06F12/123Y02B60/1225
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 9,378,153
App. No.
14/011,616
Granted
Jun 28, 2016
Kind
B2
Abstract

A level of cache memory receives modified data from a higher level of cache memory. A set of cache lines with an index associated with the modified data is identified. The modified data is stored in the set in a cache line with an eviction priority that is at least as high as an eviction priority, before the modified data is stored, of an unmodified cache line with a highest eviction priority among unmodified cache lines in the set.

Claims (53)

1. A method of managing cache memory, comprising:

in a particular level of cache memory:

receiving modified data from a higher level of cache memory;

identifying a set of cache lines with an index associated with the modified data; and

storing the modified data in the set in a cache line with an eviction priority that is at least as high as an eviction priority, before the storing, of an unmodified cache line with a highest eviction priority among unmodified cache lines in the set;

wherein the unmodified cache line with the highest eviction priority among unmodified cache lines in the set is a first cache line in the set, and wherein storing the modified data comprises:

writing the modified data into a second cache line in the set, the second cache line having a tag address associated with the modified data;

changing an eviction priority of the second cache line to the eviction priority of the first cache line; and

changing the eviction priority of the first cache line.

2. The method of claim 1 , further comprising, before the storing, identifying the eviction priority of the unmodified cache line with the highest eviction priority among unmodified cache lines in the set.

3. The method of claim 1 , wherein the unmodified cache line with the highest eviction priority among unmodified cache lines in the set comprises a least-recently-used (LRU) unmodified cache line in the set.

4. The method of claim 1 , wherein:

the particular level of cache memory is inclusive with respect to the higher level of cache memory.

5. The method of claim 1 , wherein a respective cache line in the set has a highest eviction priority in the set and is modified, the method further comprising:

writing data in the respective cache line to main memory;

changing a status of the respective cache line to unmodified, in accordance with the writing; and

changing an eviction priority of the respective cache line to a specified eviction priority distinct from the highest eviction priority.

6. The method of claim 5 , wherein:

writing the data, changing the status, and changing the eviction priority are performed in response to an incoming cache fill in the set; and

the method further comprises, in response to the incoming cache fill, selecting a victim cache line in the set for eviction, wherein the victim cache line is distinct from the respective cache line.

7. The method of claim 6 , wherein selecting the victim cache line comprises selecting the unmodified cache line with the highest eviction priority among unmodified cache lines in the set as the victim cache line.

8. The method of claim 5 , further comprising:

tracking hits to previously modified cache lines in the particular level of cache memory that have had their data written to main memory, their status changed to unmodified, and their eviction priority changed from a highest eviction priority to the specified eviction priority; and

adjusting the specified eviction priority based at least in part on the hits.

9. The method of claim 8 , wherein adjusting the specified eviction priority comprises moving the specified position closer to a lowest eviction priority in response to a number of hits satisfying a first threshold.

10. The method of claim 8 , wherein adjusting the specified eviction priority comprises moving the specified position closer to the highest eviction priority in response to a number of hits not satisfying a second threshold.

11. The method of claim 8 , further comprising:

in a selected set of the particular level of cache memory, promoting a highest-eviction-priority cache line to a lowest eviction priority after writing modified data in the highest-eviction-priority cache line to main memory;

identifying a subsequent eviction priority of the promoted cache line in the selected set when a hit to the promoted cache line occurs; and

determining the specified eviction priority based at least in part on the subsequent eviction priority.

12. A system, comprising:

a cache controller, to be coupled to a cache data array in a particular level of cache memory, to write modified data from a higher level of cache memory to a cache line in a set of cache lines in the cache data array, wherein:

the cache line has an eviction priority at least as high as an eviction priority, before the modified data is written, of an unmodified cache line with a highest eviction priority among unmodified cache lines in the set, wherein the unmodified cache line with a highest eviction priority among unmodified cache lines is a first cache line in the set, and wherein the cache controller writes the modified data into a second cache line in the set, the second cache line having an address associated with the modified data changes an eviction priority of the second cache line to the eviction priority of the first cache line; and changes the eviction priority of the first cache line; and

the set has an index associated with the modified data.

13. The system of claim 12 , further comprising at least one processor core.

14. The system of claim 13 , wherein the at least one processor core comprises at least one of a central processing unit core, a graphics processor core unit, and a digital signal processor core unit.

15. The system of claim 12 , wherein:

the particular level of cache memory is inclusive with respect to the higher level of cache memory.

16. The system of claim 12 , wherein the cache controller comprises logic to:

write data in a respective cache line in the set to main memory, wherein the respective cache line has a highest eviction priority in the set and is modified;

change a status of the respective cache line to unmodified, in accordance with the data being written to main memory; and

change the eviction priority of the respective cache line to a specified eviction priority distinct from the highest eviction priority.

17. The system of claim 16 , wherein:

the logic to write the data, change the status, and change the eviction priority is responsive to an incoming cache fill in the set; and

the cache controller further comprises logic to select a victim cache line in the set for eviction in response to the incoming cache fill, wherein the victim cache line is distinct from the respective cache line.

18. The system of claim 16 , wherein the cache controller further comprises logic to adjust the specified eviction priority based at least in part on hits to previously modified cache lines in the particular level of cache memory that have had their data written to main memory, their status changed to unmodified, and their eviction priority reduced from a highest eviction priority for their respective sets.

19. A system, comprising:

means for identifying an eviction priority of an unmodified cache line with a highest eviction priority among unmodified cache lines in a set of cache lines in a particular level of cache memory, the set of cache lines having an index associated with modified data received from a higher level of cache memory; and

means for storing the modified data in the set in a cache line with the identified eviction priority;

wherein the unmodified cache line with the highest eviction priority among unmodified cache lines in the set is a first cache line in the set, and wherein storing the modified data comprises:

writing the modified data into a second cache line in the set, the second cache line having a tag address associated with the modified data;

changing an eviction priority of the second cache line to the eviction priority of the first cache line; and

changing the eviction priority of the first cache line.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 27, 2013
From: JAFRI, SYED ALI; ECKERT, YASUKO; MANNE, SRILATHA
To: ADVANCED MICRO DEVICES, INC.
Reel/Frame 031297/0885 →
Continuity (1)
Related Publication 20150067266A1 · Mar 5, 2015