IP Library Granted Patent US 7,831,800
Granted Patent B2
US 7,831,800 · App. 11/750,266 · Granted Nov 9, 2010

Technique for prefetching data based on a stride pattern

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,831,800
App. No.
11/750,266
Granted
Nov 9, 2010
Kind
B2
Abstract

A processor system ( 100 ) includes a central processing unit ( 102 ) and a prefetch engine ( 110 ). The prefetch engine ( 110 ) is coupled to the central processing unit ( 102 ). The prefetch engine ( 110 ) is configured to detect, when data associated with the central processing unit ( 102 ) is read from a memory ( 114 ), a stride pattern in an address stream based upon whether sums of a current stride and a previous stride are equal for a number of consecutive reads. The prefetch engine ( 110 ) is also configured to prefetch, for the central processing unit ( 102 ), data from the memory ( 114 ) based on the detected stride pattern.

Claims (46)

1. A method, comprising:

detecting, when reading data from a memory associated with a device, a stride pattern in an address stream in response to determining a sum of a current stride and a previous stride associated with a first read is equal to a sum of a current stride and a previous stride associated with a second read, where the first read and the second read are consecutive reads; and

prefetching, for the device, data from the memory based on the stride pattern.

2. The method of claim 1 , further comprising:

incrementing a confidence counter in response to detecting the stride pattern.

3. The method of claim 2 , wherein the prefetching further comprises:

prefetching, for a tracked thread, data from the memory at a next address in the memory when the confidence counter exceeds a threshold value, wherein the next address corresponds to a sum of a current address of the tracked thread and a next stride or a sum-of-strides included in the stride pattern.

4. The method of claim 1 , further comprising:

allocating a new entry in a memory prefetch table when a read from the memory does not match one or more tracked threads, wherein the new entry corresponds to a respective prefetch engine.

5. The method of claim 4 , wherein the allocating further comprises:

determining whether there is room in the memory prefetch table for an additional entry when the read from the memory does not match the one or more tracked threads; and

reassigning a least recently used entry in the memory prefetch table when the read from the memory does not match the one or more tracked threads and there is no room in the memory prefetch table.

6. The method of claim 4 , wherein allocating further comprises:

determining whether a data prefetch crosses a page boundary; and

invalidating a respective entry in the memory prefetch table when the data prefetch crosses the page boundary.

7. The method of claim 1 , wherein the device is a central processing unit or an input/output device.

8. The method of claim 1 , wherein the stride pattern is an alternating stride pattern.

9. A memory subsystem, comprising:

a memory; and

a prefetch engine coupled to the memory, wherein the prefetch engine is configured to:

detect, when data associated with a device is read from the memory, a stride pattern in an address stream in response to determining a sum of a current stride and a previous stride associated with a first read is equal to a sum of a current stride and a previous stride associated with a second read, where the first read and the second read are consecutive reads; and

prefetch, for the device, data from the memory based on the stride pattern.

10. The memory subsystem of claim 9 , wherein the prefetch engine is further configured to:

increment a confidence counter in response to detecting the stride pattern.

11. The memory subsystem of claim 10 , wherein the prefetch engine is further configured to:

prefetch data for a tracked thread from the memory at a next address in the memory when the confidence counter exceeds a threshold value, wherein the next address corresponds to a sum of a current address of the tracked thread and a next stride or a sum-of-strides included in the stride pattern.

12. The memory subsystem of claim 9 , further comprising:

logic configured to allocate a new entry in a memory prefetch table when a read from the memory does not match one or more tracked threads.

13. The memory subsystem of claim 12 , wherein the logic is further configured to:

determine whether there is room in the memory prefetch table for an additional entry when the read from the memory does not match the one or more tracked threads; and

reassign a least recently used entry in the memory prefetch table when the read from the memory does not match the one or more tracked threads and there is no room in the memory prefetch table.

14. The memory subsystem of claim 12 , wherein the logic is further configured to:

determine whether a data prefetch crosses a page boundary; and

invalidate a respective entry in the memory prefetch table when the data prefetch crosses the page boundary.

15. The memory subsystem of claim 9 , wherein the device is a central processing unit or an input/output device.

16. The memory subsystem of claim 9 , wherein the stride pattern is an alternating stride pattern.

17. A processor system, comprising:

a central processing unit; and

a prefetch engine coupled to the central processing unit, wherein the prefetch engine is configured to:

detect, when data associated with the central processing unit is read from a memory, a stride pattern in an address stream in response to determining a sum of a current stride and a previous stride associated with a first read is equal to a sum of a current stride and a previous stride associated with a second read, where the first read and the second read are consecutive reads; and

prefetch, for the central processing unit, data from the memory based on the stride pattern.

18. The processor system of claim 17 , wherein the prefetch engine is further configured to:

increment a confidence counter in response to detecting the stride pattern.

19. The processor system of claim 18 , wherein the prefetch engine is further configured to:

prefetch, for a tracked thread, data from the memory at a next address in the memory when the confidence counter exceeds a threshold value, wherein the next address corresponds to a sum of a current address of the tracked thread and a next stride or a sum-of-strides included in the stride pattern.

20. The processor system of claim 19 , wherein the stride pattern is an alternating stride pattern.

Assignments (7)
RELEASE OF SECURITY INTEREST Recorded May 12, 2021
From: WILMINGTON TRUST, NATIONAL ASSOCIATION
To: GLOBALFOUNDRIES U.S. INC.
Reel/Frame 056987/0001 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 29, 2021
From: GLOBALFOUNDRIES US INC.
To: MEDIATEK INC.
Reel/Frame 055173/0781 →
RELEASE OF SECURITY INTEREST Recorded Nov 20, 2020
From: WILMINGTON TRUST, NATIONAL ASSOCIATION
To: GLOBALFOUNDRIES INC.
Reel/Frame 054636/0001 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 2, 2020
From: GLOBALFOUNDRIES INC.
To: GLOBALFOUNDRIES U.S. INC.
Reel/Frame 054633/0001 →
SECURITY AGREEMENT Recorded Nov 29, 2018
From: GLOBALFOUNDRIES INC.
To: WILMINGTON TRUST, NATIONAL ASSOCIATION
Reel/Frame 049490/0001 →
AFFIRMATION OF PATENT ASSIGNMENT Recorded Aug 18, 2009
From: ADVANCED MICRO DEVICES, INC.
To: GLOBALFOUNDRIES INC.
Reel/Frame 023120/0426 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 17, 2007
From: KOCEV, ANDREJ
To: ADVANCED MICRO DEVICES, INC.
Reel/Frame 019311/0087 →