Partitioning shared caches
AssigneeFacebook, Inc.
InventorsNarsing Vijayrao, Keith Adams
Life of this patent
Estimating the term…
Abstract
Technology is provided for partitioning a shared unified cache in a multi-processor computer system. The technology can receive a request to allocate a portion of a shared unified cache memory for storing only executable instructions, partition the cache memory into multiple partitions, and allocate one of the partitions for storing only executable instructions. The technology can further determine the size of the portion of the cache memory to be allocated for storing only executable instructions as a function of the size of the multi-processor's L1 instruction cache and the number of cores in the multi-processor.
Claims18
A computer-implemented method, comprising:
- storing, by a cache controller of a computing system, multiple executable instructions and data in a shared cache memory, the shared cache memory shared between multiple processors of the computing system, wherein the shared cache memory includes:
- a first partition that is restricted to storing the executable instructions, wherein the first partition is generated by:
- receiving a request to allocate a portion of the shared cache memory to the first partition,
- determining a size of the portion as a function of a total sum of a memory size of an instruction cache associated with each of the multiple processors, and
- partitioning the shared cache memory to generate the first partition;
- and
- a second partition that is outside of the first partition and is configured as a unified partition in which any of the data or the executable instructions is stored;
- receiving, by the cache controller, a request to store a first executable instruction in the shared cache memory;
- determining, by the cache controller, whether the first executable instruction was evicted from a higher-level cache memory;
- responsive to a determination that the first executable instruction was evicted from a higher-level cache memory, selecting, by the cache controller and based on a cache management policy, a first cache line located in the first partition to store the first executable instruction in;
- and
- responsive to a determination that the first executable instruction was not evicted from a higher-level cache memory, selecting, by the cache controller and based on the cache management policy, a second cache line located in the second partition to store the first executable instruction in.
A cache controller for a computing system that includes multiple processors and a shared cache memory shared between the multiple processors, wherein the cache controller is configured to:
- allocate a portion of the shared cache memory of a specified size as a first partition of multiple partitions that is restricted to storing executable instructions, wherein the specified size is determined based on a number of the multiple processors and a size of an instruction cache associated with the multiple processors;
- receive a request to store information in the shared cache memory;
- determine whether the information to be stored includes data or an executable instruction;
- determine, in response to determining that the information to be stored includes an executable instruction, whether the executable instruction was evicted from a higher-level cache memory;
- store the information within the first partition of the multiple partitions in an event the information includes an executable instruction that was evicted from a higher-level cache memory;
- and
- store the information in the shared cache memory in a second partition of the multiple partitions in an event the information includes an executable instruction that was not evicted from a higher-level cache memory, wherein the second partition is configured as a unified partition in which any of the data or the executable instructions is stored.
A computing system, comprising:
- multiple processors;
- a shared cache memory shared by the multiple processors;
- and
- a cache controller configured to:
- store multiple executable instructions and data in the shared cache memory, wherein an executable instruction is a first type of information and data is a second type of information, wherein the shared cache memory includes:
- a first partition that is restricted to storing information of the first type, wherein the first partition is generated by:
- receiving a request to allocate a portion of the shared cache memory to the first partition,
- determining a size of the portion as a function of a total sum of a memory size of a cache for information of the first type associated with each of the multiple processors, and
- partitioning the shared cache memory to generate the first partition;
- and
- a second partition that is outside of the first partition and is configured as a unified partition in which any of the data or the executable instructions is stored;
- receive a request to store a first information of the first type in the shared cache memory;
- and
- determine whether the first information of the first type was evicted from a higher-level cache memory;
- responsive to a determination that the first information of the first type was evicted from a higher-level cache memory, select, based on a cache management policy, a first cache line located in the first partition to store the first information in;
- and
- responsive to a determination that the first information of the first type was not evicted from a higher-level cache memory, select, based on the cache management policy, a second cache line located in the second partition to store the first information in.
Dependencies are inferred from the claim text.