System cache with sticky allocation
AssigneeApple Inc.
InventorsSukalpa Biswas, Shinye Shiu, James Wang
Life of this patent
Estimating the term…
Abstract
Methods and apparatuses for implementing a system cache within a memory controller. Multiple requesting agents may allocate cache lines in the system cache, and each line allocated in the system cache may be associated with a specific group ID. Also, each line may have a corresponding sticky state which indicates if the line should be retained in the cache. The sticky state is determined by an allocation hint provided by the requesting agent. When a cache line is allocated with the sticky state, the line will not be replaced by other cache lines fetched by any other group IDs.
Claims20
A memory controller comprising a system cache, wherein the system cache comprises:
- a data memory configured to store a plurality of cache lines;
- a tag memory configured to store a plurality of tags corresponding to the plurality of cache lines, wherein each of the plurality of tags includes a state field and a group identifier (ID) field, wherein the group ID field identifies a dataflow associated with the cache line;
- and
- a control unit configured to:
- allocate one of the plurality of cache lines and one of the plurality of tags for a given request;
- prevent a first cache line with a sticky state from being replaced by a second cache line with a non-sticky state;
- and
- in response to detecting a cache hit to a second cache line with a non-sticky state for a request with a sticky allocation hint, maintain the second cache line in a non-sticky state.
A cache configured to:
- store a plurality of cache lines in a data memory;
- store a plurality of tags corresponding to the plurality of cache lines, wherein each of the plurality of tags includes a state and a group identifier (ID), wherein the group ID identifies a dataflow group of the request which caused the cache line to be stored in the cache;
- allocate and replace cache lines in the data memory;
- and
- prevent a first cache line with a sticky state allocated for a first group ID from being replaced by a cache line fetched for any other group ID;
- wherein responsive to detecting a cache hit to a second cache line with a non-sticky state for a request with a sticky allocation hint, the cache is configured to maintain the second cache line in a non-sticky state.
A method comprising:
- receiving a first sticky request at a system cache;
- searching for a non-sticky cache line storage location in the system cache, responsive to the first sticky request missing in the system cache;
- replacing a first cache line storage location with a missing cache line corresponding to the first sticky request, responsive to determining the first cache line storage location has a non-sticky state;
- updating a state of the first cache line storage location to sticky;
- receiving a second sticky request at the system cache;
- detecting a hit of the second sticky request to a second cache line storage location, wherein the second cache line storage location has a non-sticky state;
- and
- maintaining the second cache line storage location in a non-sticky state responsive to detecting the hit of the second sticky request to the second cache line storage location.
A memory controller comprising a system cache, wherein the system cache comprises:
- a data memory configured to store a plurality of cache lines;
- a tag memory configured to store a plurality of tags corresponding to the plurality of cache lines, wherein each of the plurality of tags includes a state field and a group identifier (ID) field, wherein the group ID field identifies a dataflow associated with the cache line;
- and
- a control unit configured to:
- allocate one of the plurality of cache lines and one of the plurality of tags for a given request;
- prevent a first cache line with a sticky state from being replaced by a second cache line with a non-sticky state;
- wherein the first cache line with a sticky state is assigned to a first group ID, and wherein the control unit is further configured to prevent cache lines fetched by other group IDs from replacing the first cache line, and wherein the control unit is configured to reassign the first cache line to a second group ID responsive to detecting a hit to the first cache line by a sticky request from the second group ID.
Dependencies are inferred from the claim text.