# US 2017/0293560 A1 · Method and apparatus for performing memory prefetching

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2017/0293560 A1
- Document ID: US20170293560A1
- Status: Published application
- Kind: A1
- Application number: 15/268,953
- Filed: 2016-09-19
- Published: 2017-10-12
- Earliest claimed: 2016-04-07
- Assignees: Advanced Micro Devices, Inc.
- Applicants: Advanced Micro Devices, Inc.
- Inventors: Yasuko Eckert; Nuwan Jayasena; Reena Panda; Onur Kayiran; Michael W. Boyer
- Web page: https://patentgrep.com/patent/US20170293560A1

## CPC

- G06F 12/0862: with prefetch
- G06F 2212/1016: Performance improvement
- G06F 2212/6022: Using a prefetch buffer or dedicated prefetch cache
- G06F 2212/6024: History based prefetching
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method and apparatus for performing memory prefetching includes determining whether to initiate prefetching. Upon a determination to initiate prefetching, a first memory row is determined as a suitable prefetch candidate, and it is determined whether a particular set of one or more cachelines of the first memory row is to be prefetched.

## Claims

### Claim 1

A method for performing memory prefetching, the method comprising:
determining whether to initiate prefetching;
upon a determination to initiate prefetching, determining a first memory row as a suitable prefetch candidate; and
determining whether a particular set of one or more cachelines of the first memory row is to be prefetched.

### Claim 2 (depends on 1)

The method of claim 1 wherein determining to initiate prefetching includes any one of: determining there is storage space in a prefetch buffer to store one or more prefetched cachelines, or determining that an open memory row is to be closed.

### Claim 3 (depends on 1)

The method of claim 1 wherein determining to not initiate prefetching includes any one of: determining a number of outstanding demand requests to a same memory bank that contains the first memory row exceeds a threshold, or determining a demand fetch that has been waiting a number of time cycles that exceeds a threshold requires closing the first memory row.

### Claim 4 (depends on 1)

The method of claim 1 wherein determining whether the first row is a suitable prefetch candidate includes determining whether the accessing of unique cachelines from the first row exceeds a predetermined threshold.

### Claim 5 (depends on 1)

The method of claim 1 wherein determining whether the first row is a suitable prefetch candidate includes determining that a number of outstanding demand requests to the first row meets or exceeds a threshold.

### Claim 6 (depends on 1)

The method of claim 1 wherein determining whether the first row is a suitable prefetch candidate includes whether the number of times the first row has been accessed exceeds a threshold.

### Claim 7 (depends on 1)

The method of claim 1, further comprising assigning a score to a criteria used to determine that the particular one or more cachelines of the first row is to be prefetched.

### Claim 8 (depends on 7)

The method of claim 7, further comprising increasing the assigned score of the criteria if the prefetched particular cacheline satisfies a subsequent demand request.

### Claim 9 (depends on 7)

The method of claim 7, further comprising decreasing the score of the criteria if the particular cacheline is evicted from a prefetch buffer without satisfying a demand request.

### Claim 10 (depends on 7)

The method of claim 7 wherein when the score of a first criteria exceeds the score of a second criteria, a row determined to be a prefetch candidate by the first criteria is prioritized for prefetching over a row determined to be a prefetch candidate by the second criteria.

### Claim 11 (depends on 7)

The method of claim 7 wherein when the score of a first criteria is less than a threshold, a row determined to be a prefetch candidate by the first criteria is not prefetched.

### Claim 12

An apparatus, comprising:a memory; and
a memory controller, the memory controller including a prefetch logic and a prefetch buffer, wherein the prefetch logic is configured to determine whether to initiate prefetching, and upon a determination to initiate prefetching, determine a first memory row as a suitable prefetch candidate, and determine whether a particular set of one or more cachelines of the first memory row is to be prefetched.

### Claim 13 (depends on 12)

The apparatus of claim 12 wherein the prefetch logic is further configured to initiate prefetching upon a determination of any one of: determining there is storage space in a prefetch buffer to store one or more prefetched cachelines, or determining that an open memory row is to be closed.

### Claim 14 (depends on 12)

The apparatus of claim 12 wherein the prefetch logic is further configured to not initiate prefetching upon a determination of any one of: determining a number of outstanding demand requests to a same memory bank that contains the first memory row exceeds a threshold, or determining a demand fetch that has been waiting a number of time cycles that exceeds a threshold requires closing the first memory row.

### Claim 15 (depends on 12)

The apparatus of claim 12 wherein the prefetch logic is further configured to determine whether the first row is a suitable prefetch candidate by determining whether the accessing of unique cachelines from the first row exceeds a predetermined threshold.

### Claim 16 (depends on 12)

The apparatus of claim 12 wherein the prefetch logic is further configured to assign a score to a criteria used to determine that the particular one or more cachelines of the first row is to be prefetched.

### Claim 17 (depends on 16)

The apparatus of claim 16 wherein the score of the criteria is increased if the prefetched particular cacheline satisfies a subsequent demand request.

### Claim 18 (depends on 16)

The apparatus of claim 16 wherein the score of the criteria is decreased if the particular cacheline is evicted from the prefetch buffer without satisfying a demand request.

### Claim 19 (depends on 16)

The apparatus of claim 16 wherein when the score of a first criteria exceeds the score of a second criteria, a row determined to be a prefetch candidate by the first criteria is prioritized for prefetching over a row determined to be a prefetch candidate by the second criteria.

### Claim 20 (depends on 16)

The apparatus of claim 16 wherein when the score of a first criteria is less than a threshold, a row determined to be a prefetch candidate by the first criteria is not prefetched.
