IP Library › Granted Patent US 10,430,349
Granted Patent B2
US 10,430,349 · App. 15/180,995 · Granted Oct 1, 2019

Scaled set dueling for cache replacement policies

Inventor: Paul James Moyer (Fort Collins, CO)
Assignee: Advanced Micro Devices, Inc.
G06F12/128G06F12/0811G06F12/0848G06F12/0862G06F12/0864G06F12/0866G06F12/121G06F12/123G06F12/127G06F2212/1021G06F2212/1024G06F2212/281G06F2212/502G06F2212/601
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 10,430,349
App. No.
15/180,995
Granted
Oct 1, 2019
Kind
B2
Abstract

A processing system includes a cache that includes a cache lines that are partitioned into a first subset of the cache lines and a second subsets of the cache lines. The processing system also includes one or more counters that are associated with the second subsets of the cache lines. The processing system further includes a processor configured to modify the one or more counters in response to a cache hit or a cache miss associated with the second subsets. The one or more counters are modified by an amount determined by one or more characteristics of a memory access request that generated the cache hit or the cache miss.

Claims (59)

1. An apparatus comprising:

a cache including cache lines that are partitioned into a first subset of the cache lines and second subsets of the cache lines;

at least one counter associated with the second subsets of the cache lines; and

a processor configured to modify the at least one counter in response to a cache hit associated with the second subsets, wherein the at least one counter is modified by an amount based on a degree of speculation of a memory access request that generated the cache hit, the degree of speculation based on at least one of: whether the memory access request is directed to an instruction cache or a data cache; and whether the cache hit is a result of a page table walk.

2. The apparatus of claim 1 , wherein the processor further is configured to increment the at least one counter in response to a cache hit to a first one of the second subsets and decrement the at least one counter in response to a cache hit to a second one of the second subsets.

3. The apparatus of claim 2 , wherein the processor is further configured to:

increment the at least one counter by an amount that is determined based on a degree of speculation of the memory access request that generated the cache hit to the first one of the second subsets, and

decrement the at least one counter by an amount that is determined based on a degree of speculation of the memory access request that generated the cache hit to the second one of the second subsets.

4. The apparatus of claim 1 , wherein the processor is further configured to:

decrement the at least one counter in response to a cache miss associated with a first one of the second subsets; and

increment the at least one counter in response to a cache miss to a second one of the second subsets.

5. The apparatus of claim 4 , wherein the processor is further configured to:

decrement the at least one counter by an amount that is determined based on a latency associated with the cache miss associated with the first one of the second subsets; and

increment the at least one counter by an amount that is determined based on a latency associated with the cache miss associated with the second one of the second subsets.

6. The apparatus of claim 5 , wherein the processor is further configured to:

decrement the at least one counter by the same amount for all cache misses associated with the first one of the second subsets in response to detecting bandwidth limited operation based on feedback indicating bandwidth consumption, and

increment the at least one counter by the same amount for all cache misses associated with the second one of the second subsets in response to detecting the bandwidth limited operation.

7. The apparatus of claim 1 , wherein:

the second subsets use a corresponding plurality of cache replacement policies; and

the processor is further configured to:

select one of the plurality of cache replacement policies based on at least one value of the at least one counter; and

configure the first subset to use the selected one of the plurality of cache replacement policies.

8. A method, comprising:

partitioning cache lines into a first subset of the cache lines and second subsets of the cache lines;

detecting a cache hit associated with the second subsets; and

modifying at least one counter associated with the second subsets of the cache lines in response to the cache hit, wherein the at least one counter is modified by an amount based on a degree of speculation of a memory access request that generated the cache hit, the degree of speculation based on at least one of: whether the memory access request is directed to an instruction cache or a data cache; and whether the cache hit is a result of a page table walk.

9. The method of claim 8 , wherein modifying the at least one counter comprises:

incrementing the at least one counter in response to a cache hit to a first one of the second subsets, and

decrementing the at least one counter in response to a cache hit to a second one of the second subsets.

10. The method of claim 9 , wherein:

incrementing the at least one counter comprises incrementing the at least one counter by an amount that is determined based on a degree of speculation of the memory access request that generated the cache hit to the first one of the second subsets; and

decrementing the at least one counter comprises decrementing the at least one counter by an amount that is determined based on a degree of speculation of the memory access request that generated the cache hit to the second one of the second subsets.

11. The method of claim 8 , wherein modifying the at least one counter further comprises:

decrementing the at least one counter in response to a cache miss associated with a first one of the second subsets; and

incrementing the at least one counter in response to a cache miss to a second one of the second subsets.

12. The method of claim 11 , wherein:

decrementing the at least one counter comprises decrementing the at least one counter by an amount that is determined based on a latency associated with the cache miss associated with the first one of the second subsets; and

incrementing the at least one counter comprises incrementing the at least one counter by an amount that is determined based on a latency associated with the cache miss associated with the second one of the second subsets.

13. The method of claim 11 , wherein:

decrementing the at least one counter comprises decrementing the at least one counter by the same amount for all cache misses associated with the first one of the second subsets in response to detecting bandwidth limited operation based on feedback indicating bandwidth consumption; and

incrementing the at least one counter comprises incrementing the at least one counter by the same amount for all cache misses associated with the second one of the second subsets in response to detecting the bandwidth limited operation.

14. The method of claim 8 , wherein the second subsets use a corresponding plurality of cache replacement policies, the method further comprising:

selecting one of the plurality of cache replacement policies based on at least one value of the at least one counter; and

configuring the first subset to use the selected one of the plurality of cache replacement policies.

15. An apparatus, comprising:

a cache including cache lines that are partitioned into a first subset and second subsets for storing information from a memory;

at least one counter associated with the second subsets; and

a processor configured to:

selectively enable or disable set dueling to determine a cache replacement policy for the cache based on feedback indicating whether operation of at least one of the memory or the cache is bandwidth limited, wherein the set dueling chooses between first and second cache replacement policies implemented by the first and second subsets, respectively, on the basis of the at least one counter; and

modify the at least one counter in response to a cache hit associated with the second subsets, wherein the at least one counter is modified by an amount based on a degree of speculation of a memory access request that generated the cache hit, the degree of speculation based on at least one of: whether the memory access request is directed to an instruction cache or a data cache; and whether the cache hit is a result of a page table walk.

16. The apparatus of claim 15 , wherein:

the processor is further configured to modify the at least one counter in response to at least one of a cache hit or a cache miss associated with the second subsets; and

the at least one counter is modified by an amount based on at least one characteristic of a memory access request that generated the at least one of the cache hit or the cache miss.

17. The apparatus of claim 15 , wherein the processor is further configured to disable set dueling in response to detecting bandwidth limited operation based on feedback indicating bandwidth consumption by at least one of the memory or the cache.

18. The apparatus of claim 17 , wherein the processor is further configured to:

decrement the at least one counter by the same amount for all cache misses associated with a first one of the second subsets in response to detecting the bandwidth limited operation; and

increment the at least one counter by the same amount for all cache misses associated with a second one of the second subsets in response to detecting the bandwidth limited operation.

19. The apparatus of claim 15 , wherein the degree of speculation is based on whether the memory access request is directed to an instruction cache or a data cache.

20. The apparatus of claim 15 , wherein the degree of speculation is based on whether the cache hit is a result of a page table walk.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 14, 2016
From: MOYER, PAUL JAMES
To: ADVANCED MICRO DEVICES, INC.
Reel/Frame 038908/0950 →
Continuity (1)
Related Publication 20170357588A1 · Dec 14, 2017
Cited By (1)
US 12,737,297