Way partitioning for a system-level cache
Methods, systems, and apparatus, including computer programs encoded on computer storage media, for a system-level cache to allocate cache resources by a way-partitioning process. One of the methods includes maintaining a mapping between partitions and priority levels and allocating primary ways to respective enabled partitions in an order corresponding to the respective priority levels assigned to the enabled partitions.
1. A system comprising:
multiple client devices configured to read data from a memory device; and
a system-level cache configured to perform operations rising:
caching data requests to the memory device from a first set of the multiple client devices operating in an initial execution context,
detecting a new execution context, and
in response, reassigning ways of the system-level cache, including:
assigning primary ways to partitions using a primary partitioning table, and
assigning secondary ways to partitions using a secondary partitioning table.
2. The system of claim 1 , wherein the operations further comprise caching, by the system-level cache, data requests to the memory device from a second set of the multiple client devices operating in the new execution context.
3. The system of claim 1 , wherein each primary way is dedicated to a single respective partition corresponding to a memory buffer accessed by one or more of the client devices, and
wherein each secondary way is shared by a group of multiple partitions corresponding to multiple memory buffers accessed by a group of the client devices.
4. The system of claim 1 , wherein reassigning ways of the system-level cache comprises allocating the primary ways to respective enabled partitions in an order corresponding to respective priority levels assigned to the enabled partitions.
5. The system of claim 1 , wherein the primary partitioning table includes multiple entries that each represent a respective partition corresponding to a memory buffer used by one or more respective client devices, wherein each entry includes data representing a respective requested number of primary ways for the corresponding partition.
6. The system of claim 1 , wherein reassigning ways of the system-level cache comprises:
iterating over enabled entries in the primary partitioning table, wherein each enabled entry represents a partition that uses the system-level cache for the new execution context; and
allocating, for each enabled entry, a number of primary ways to a respective partition corresponding to the enabled entry.
7. The system of claim 6 , wherein the operations further comprise changing the enabled entries in the primary partitioning table for the new execution context.
8. The system of claim 1 , wherein the first set of client devices operating in the initial execution context is different from a second set of client devices that operate in the new execution context.
9. The system of claim 1 , wherein the operations further comprise activating one or more additional client devices of the system for the new execution context.
10. The system of claim 1 , wherein the new execution context represents a system usage change.
11. The system of claim 1 , wherein the new execution context represents a change in system state.
12. One or more non-transitory computer storage media encoded with instructions that when executed by a system-level cache cause the system-level cache to perform operations comprising:
caching, by the system-level cache, data requests to a memory device from a first set of multiple client devices operating in an initial execution context;
detecting a new execution context; and
in response, reassigning ways of the system-level cache, including:
assigning primary ways to partitions using a primary partitioning table, and
assigning secondary ways to partitions using a secondary partitioning table.
13. The one or more non-transitory computer storage media of claim 12 , further comprising caching, by the system-level cache, data requests to the memory device from a second set of the multiple client devices operating in the new execution context.
14. The one or more non-transitory computer storage media of claim 12 , wherein each primary way is dedicated to a single respective partition corresponding to a memory buffer accessed by one or more of the client devices, and
wherein each secondary way is shared by a group of multiple partitions corresponding to multiple memory buffers accessed by a group of the client devices.
15. The one or more non-transitory computer storage media of claim 12 , wherein reassigning ways of the system-level cache comprises allocating the primary ways to respective enabled partitions in an order corresponding to respective priority levels assigned to the enabled partitions.
16. The one or more non-transitory computer storage media of claim 12 , wherein the primary partitioning table includes multiple entries that each represent a respective partition corresponding to a memory buffer used by one or more respective client devices, wherein each entry includes data representing a respective requested number of primary ways for the corresponding partition.
17. The one or more non-transitory computer storage media of claim 12 , wherein reassigning ways of the system-level cache comprises:
iterating over enabled entries in the primary partitioning table, wherein each enabled entry represents a partition that uses the system-level cache for the new execution context; and
allocating, for each enabled entry, a number of primary ways to a respective partition corresponding to the enabled entry.
18. The one or more non-transitory computer storage media of claim 17 , wherein the operations further comprise changing the enabled entries in the primary partitioning table for the new execution context.
19. The one or more non-transitory computer storage media of claim 12 , wherein the first set of client devices operating in the initial execution context is different from a second set of client devices that operate in the new execution context.
20. The one or more non-transitory computer storage media of claim 12 , wherein the operations further comprise activating one or more additional client devices of the system for the new execution context.