Cache coherence monitoring and feedback
AssigneeInternational Business Machines Corporation
InventorsXiaowei Shen, David F. Bacon, Robert W. Wisniewski, Orran Krieger
Life of this patent
Estimating the term…
Abstract
Color-based caching allows each cache line to be distinguished by a specific color, and enables the manipulation of cache behavior based upon the colors of the cache lines. When multiple threads are able to share a cache, effective cache management is critical to overall performance. Color-based caching provides an effective method to better utilize caches and avoid unnecessary cache thrashing and pollution. Hardware maintains color-based counters relative to the cache lines to monitor and obtain feedback on cache line events. These counters are utilized for cache coherence transactions in multiple processor systems.
Claims17
An apparatus comprising:
- one or more processors having access to one or more caches, the one or more caches comprising one or more cache lines;
- a generator that generates memory access operations in response to software running on the apparatus;
- an assignor that assigns a color to the memory access operations;
- a receiver that receives and records color information for each cache line in response to a memory access operation utilizing a cache line;
- and
- a storage device configured to maintain the color information in color-based counters, wherein at least one of the color-based counters comprises one of:
- a first counter type comprising a two-dimensional matrix, the two-dimensional matrix including an event dimension and a color dimension, the event dimension representing a specific cache line event, the first counter type representing a number of times that the specific cache line event happens on a specific color represented by the color dimension;
- and
- a second counter type comprising a three-dimensional matrix, the three-dimensional matrix including an event dimension, a first color dimension, and a second color dimension, the event dimension representing a specific cache line event, the second counter type representing a number of times that, with respect to a specific cache line event, a color represented by the first color dimension interacts with a color represented by the second color dimension;
- and
- wherein hardware of the apparatus is configured to monitor said color-based counters to obtain feedback on one or more cache line events.
A method comprising:
- generating memory access operations in response to software, the memory access operations corresponding to accessing one or more cache lines of one or more caches;
- assigning a color to the memory access operations;
- receiving and recording color information for each cache line in response to a memory access operation utilizing a cache line;
- maintaining color information in a storage device in color-based counters, wherein at least one of the color-based counters comprises one of:
- a first counter type comprising a two-dimensional matrix, the two-dimensional matrix including an event dimension and a color dimension, the event dimension representing a specific cache line event, the first counter type representing a number of times that the specific cache line event happens on a specific color represented by the color dimension;
- and
- a second counter type comprising a three-dimensional matrix, the three-dimensional matrix including an event dimension, a first color dimension, and a second color dimension, the event dimension representing a specific cache line event, the second counter type representing a number of times that, with respect to a specific cache line event, a color represented by the first color dimension interacts with a color represented by the second color dimension;
- and
- monitoring the color-based counters to obtain feedback on one or more cache line events.
A non-propagating program storage device readable by machine, tangibly embodying a program of instructions executable by the machine to perform steps for monitoring cache coherence, said steps comprising:
- generating memory access operations in response to software, the memory access operations corresponding to accessing one or more cache lines of one or more caches;
- assigning a color to the memory access operations;
- receiving and recording color information for each cache line in response to a memory access operation utilizing a cache line;
- maintaining color information in a storage device in color-based counters, wherein at least one of the color-based counters comprises one of:
- a first counter type comprising a two-dimensional matrix, the two-dimensional matrix including an event dimension and a color dimension, the event dimension representing a specific cache line event, the first counter type representing a number of times that the specific cache line event happens on a specific color represented by the color dimension;
- and
- a second counter type comprising a three-dimensional matrix, the three-dimensional matrix including an event dimension, a first color dimension, and a second color dimension, the event dimension representing a specific cache line event, the second counter type representing a number of times that, with respect to a specific cache line event, a color represented by the first color dimension interacts with a color represented by the second color dimension;
- wherein the color information comprises a color-based counter corresponding to a cache line event;
- and
- monitoring the color-based counters to obtain feedback on one or more cache line events.
Dependencies are inferred from the claim text.