Automatic cache bypass for instructions exhibiting poor cache hit ratio
First Claim
1. In a computer system including a main memory, a processor requesting data from said main memory, and a cache interposed between said processor and said main memory and storing a subset of data in said main memory, an automatic cache bypass mechanism for instructions exhibiting poor cache hit ratio comprising:
- cache control means for determining if requested data is in the cache thereby signifying a cache hit, and if so, retrieving the requested data from the cache, but otherwise, retrieving the requested data from said main memory;
table means addressed by an instruction address from said processor for keeping a record of last referenced line addresses and a status of cacheable or noncacheable based on a history of cache hits or misses and for storing a bonus value for cache hits, said bonus value being related to a number of cache hits of said last referenced line addresses and providing a threshold for determining when to switch said last referenced line addresses from a status of cacheable to noncacheable;
means responsive to said cache control means and said table means for storing data retrieved from said main memory into said cache when a current status for the data as recorded in said table means is cacheable and for bypassing said cache when said current status is noncacheable, said cache being bypassed when a number of cache misses for the requested data exceeds the bonus value; and
means for changing the status of data as recorded in said table means as a function of cache hits and said bonus value.
1 Assignment
0 Petitions
Accused Products
Abstract
A cache bypass mechanism automatically avoids caching of data for instructions whose data references, for whatever reason, exhibit low cache hit ratio. The mechanism keeps a record of an instruction'"'"'s behavior in the immediate past, and this record is used to decide whether its future references should be cached or not. If an instruction is experiencing bad cache hit ratio, it is marked as non-cacheable, and its data references are made to bypass the cache. This avoids the additional penalty of unnecessarily fetching the remaining words in the line, reduces the demand on the memory bandwidth, avoids flushing the cache of useful data and, in parallel processing environments, prevents line thrashing. The cache management scheme is automatic and requires no compiler or user intervention.
157 Citations
11 Claims
-
1. In a computer system including a main memory, a processor requesting data from said main memory, and a cache interposed between said processor and said main memory and storing a subset of data in said main memory, an automatic cache bypass mechanism for instructions exhibiting poor cache hit ratio comprising:
-
cache control means for determining if requested data is in the cache thereby signifying a cache hit, and if so, retrieving the requested data from the cache, but otherwise, retrieving the requested data from said main memory; table means addressed by an instruction address from said processor for keeping a record of last referenced line addresses and a status of cacheable or noncacheable based on a history of cache hits or misses and for storing a bonus value for cache hits, said bonus value being related to a number of cache hits of said last referenced line addresses and providing a threshold for determining when to switch said last referenced line addresses from a status of cacheable to noncacheable; means responsive to said cache control means and said table means for storing data retrieved from said main memory into said cache when a current status for the data as recorded in said table means is cacheable and for bypassing said cache when said current status is noncacheable, said cache being bypassed when a number of cache misses for the requested data exceeds the bonus value; and means for changing the status of data as recorded in said table means as a function of cache hits and said bonus value. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
-
Specification