Patent ID: 7958317

Claim:
A method of prefetching sequential values from a lower level of a memory hierarchy into a cache memory at a higher level of the memory hierarchy, the method comprising: receiving an access request for a value at the cache memory; determining whether or not a cache line containing the value is present in the cache memory; responsive to determining the cache line is present in the cache memory, retrieving a first indicator associated with the cache line that indicates whether or not the cache line has been previously accessed since the cache line was prefetched; determining whether or not the cache line has been previously accessed in conformity with a value of the first indicator; responsive to determining that the cache line has not been previously accessed, requesting loading, from the lower level of a memory hierarchy, of another line of values into the cache memory having a sequential relationship with the cache line, whereby the cache memory triggers automatic prefetching of cache lines ahead of requests for access to their values; responsive to determining the cache line is not present in the cache memory, determining whether a line address of the value is present in a load miss queue entry of the cache memory; responsive to determining that the line address is present in the load miss queue entry, determining whether or not the cache line has had a previous load miss, wherein the requesting loading is further performed responsive to the determining that the cache line has had a previous load miss; and responsive to determining that the cache line has had a previous load miss, comparing a first offset of a previous load miss stored in the load miss queue entry with a second offset of the value, wherein the requesting loading requests a next higher line address cache in the sequential relationship if the first offset is less than or equal to the second offset or requests a next lower line address cache line in the sequential relationship if the first offset is greater than the second offset.