Fine grained cache allocation
AssigneeInternational Business Machines Corporation
InventorsRamakrishnan Rajamony, William E. Speight, Lixin Zhang
Life of this patent
Estimating the term…
Abstract
A mechanism is provided in a virtual machine monitor for fine grained cache allocation in a shared cache. The mechanism partitions a cache tag into a most significant bit (MSB) portion and a least significant bit (LSB) portion. The MSB portion of the tags is shared among the cache lines in a set. The LSB portion of the tags is private, one per cache line. The mechanism allows software to set the MSB portion of tags in a cache to allocate sets of cache lines. The cache controller determines whether a cache line is locked based on the MSB portion of the tag.
Claims20
A method, in a data processing system, for fine grained cache allocation of a shared cache, the method comprising:
- receiving, by a cache controller, a tag portion from an application, within a plurality of applications, to allocate a group of cache lines in a shared cache to the application, wherein each cache line within the shared cache has a tag having a most significant bit portion and a least significant hit portion, wherein the shared cache is shared between the plurality of applications, wherein the most significant bit portion of the tag comprises a group tag for each group of cache lines, wherein the least significant bit portion of the tag comprises a private tag for each respective cache line, wherein only cache lines with the most significant bit portion of the tag can be cached in the group of cache lines;
- allocating the group of cache lines to the application by setting the most significant hit tag portion to the tag portion horn the application for the group of cache lines in a tag array of the shared cache;
- responsive to an attempt to overwrite a given cache line within the group of cache lines, determining whether the given cache line is locked to the application based on the most significant bit tag portion of the given cache line;
- and
- overwriting, by the cache controller, the given cache line if the cache line is not locked, wherein overwriting the given cache line comprises overwriting a most significant bit portion of a tag of the given cache line.
An apparatus, in a data processing system, for fine grained cache allocation of a shared cache, the apparatus comprising:
- a cache array;
- and
- a cache controller coupled the cache array, wherein the cache controller is configured to:
- receive a tag portion from an application, within a plurality of applications, to allocate a group of cache lines in a shared cache to the application, wherein each cache line within the shared cache has a tag having a most significant bit portion and a least significant bit portion, wherein the shared cache is shared between the plurality of applications, wherein the most significant bit portion of the tag comprises a group tag for each group of cache lines, wherein the least significant bit portion of the tag comprises a private tag for each respective cache line, and wherein only cache lines with the most significant bit portion of the tag can be cached in the group of cache lines;
- allocating the group of cache lines to the application by setting the most significant bit tag portion to the tag portion from the application for the group of cache lines of the cache array in a tag array;
- responsive to an attempt to overwrite a given cache line within the group of cache lines, determine whether the given cache line is locked to the application based on the most significant bit tag portion of the given cache line;
- and
- overwrite the given cache line if the cache line is not locked, wherein overwriting the given cache line comprises overwriting a most significant bit portion of a tag of the given cache line.
A computer program product comprising a non-transitory computer readable medium having a computer readable program, wherein the computer readable program, when executed on a computing device, causes the computing device to:
- receive a tag portion from an application, within a plurality of applications, to allocate a group of cache lines in a shared cache to the application, wherein each cache line within the shared cache has a tag having a most significant hit portion and a least significant hit portion, wherein the shared cache is shared between the plurality of applications, wherein the most significant hit portion of the tag comprises a group tag for each group of cache lines, wherein the least significant bit portion of the tag comprises a private tag for each respective cache line, and wherein only cache lines with the most significant bit portion of the tag can be cached in the group of cache lines;
- allocating the group of cache lines to the application by setting the most significant bit tag portion to the tag portion from the application for the group of cache lines of the cache array in a tag array;
- responsive to an attempt to overwrite a given cache line within the group of cache lines, determine whether the given cache line is locked to the application based on the most significant bit tag portion of the given cache line;
- and
- overwrite the given cache line if the cache line is not locked, wherein overwriting the given cache line comprises overwriting a most significant bit portion of a tag of the given cache line.
Dependencies are inferred from the claim text.