System and method for prefetching data into a cache based on miss distance
AssigneeIntel Corporation
InventorsMohammad A. Abdallah, Khalid Al-Dajani
Life of this patent
Estimating the term…
Abstract
A prefetcher to prefetch data for an instruction based on the distance between cache misses caused by the instruction. In an embodiment, the prefetcher includes a memory to store a prefetch table that contains one or more entries that include the distance between cache misses caused by an instruction. In a further embodiment, the addresses of data elements prefetched are determined based on the distance between cache misses recorded in the prefetch table for the instruction.
Claims28
An apparatus comprising:
- a prefetcher to prefetch data corresponding to an instruction based on the distance between cache misses caused by the instruction, wherein the prefetcher comprises a memory to store a prefetch table comprising one or more entries that include the distance between cache misses caused by an instruction, and wherein the prefetch table only comprises an entry corresponding to an instruction if the instruction has caused at least two cache misses.
A prefetcher comprising:
- a first memory to store a prefetch table having a plurality of entries, each comprising information related to an instruction, the entries comprising a miss distance field to store the distance between a first address whose access by the instruction caused a first cache miss and a second address whose access by the instruction caused a second cache miss, the second cache miss being the next cache miss for the instruction after the first cache miss, wherein the prefetch table does not store any information identifying the instruction to which the entry is related;
- a second memory to store a front end table having a plurality of entries, each comprising instruction pointers, wherein each entry in the front end table corresponds to an entry in the prefetch table;
- and
- a prefetch manager coupled to the first memory to manage the prefetch table.
A processor comprising:
- a prefetcher to prefetch data for use by an instruction based on a recorded distance between cache misses that were generated by the instruction;
- an execution unit to execute the instruction;
- a cache;
- a decoder;
- a first memory to store a prefetch table comprising an entry that stores prefetch information related to an instruction but does not store information identifying the instruction to which the entry is related, the first memory being coupled to the prefetcher and located closer to the cache than to the decoder;
- and
- a second memory to store a front end table comprising an entry that corresponds to an entry in the prefetch table, wherein the front end table entry stores information identifying the instruction to which the entry is related, and wherein the second memory is coupled to the prefetcher and located closer to the decoder than the cache.
A method of managing data prefetching, the method comprising:
- determining that there has been a cache miss during the execution cycle of an instruction that loads from a first address;
- determining whether a first prefetch table contains an entry for the instruction, the entry storing a miss distance, the entry storing a second address whose access by the instruction last caused a cache miss for the instruction, and the entry storing a confirmation field to indicate whether the stored miss distance was confirmed;
- if the first prefetch table contains an entry for the instruction, determining whether to prefetch data based in part on information stored in the entry;
- and
- if the first prefetch table does not contain an entry for the instruction, creating a new entry in the first prefetch table for the instruction, wherein the new entry will only replace an entry in the prefetch table that has a confirmation field indicating that the miss distance stored in that entry being replaced was confirmed if the other entries in the prefetch table also have a confirmation field that indicates that the miss distance stored in those other entries was confirmed.
Dependencies are inferred from the claim text.