Shared Cache Management with Sticky Bit Classification

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In multi-core computer systems, shared cache management can negatively impact performance due to differing resource requirements among programs, leading to suboptimal cache replacement decisions and inefficiencies in multi-threaded workloads.

Innovation Solution

A system with circuitry that manages a shared cache by identifying data entries for replacement based on their usage across multiple processing entities, maintaining indications of which entities allocated data, and updating replacement information to age entries from Most Recently Used (MRU) to Least Recently Used (LRU) status, with 'sticky' indications for shared data to prioritize cache retention.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Quantity of substance

If a shared cache is used to improve resource utilization across multiple cores, then cache hit rate improves, but performance degradation occurs due to negative interactions between programs with different resource requirements

Engineering Contradiction:
Improvecache hit rateVSAvoidsystem performance
Core Design Contradiction:
Quantity of substanceVSProductivity

Solution Approach 1:

The patent segments the shared cache management by introducing separate replacement policies for shared cache lines versus private cache lines. The L3 cache is divided into portions managed by different policies based on whether the data is shared across cores or private to a specific core, allowing optimized handling for each type and preventing performance degradation from inappropriate replacement decisions.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent implements dynamic cache line classification that transitions cache lines between shared and private states based on access patterns. The sticky bit mechanism allows cache lines to be dynamically reclassified from private to shared when accessed by multiple cores, and the replacement policy adapts accordingly, providing dynamic optimization rather than static classification.

Inventive Principle:
Principle #15Dynamics

2Reliability

If exclusive cache hierarchy is used to prevent off-chip cache misses, then cache utility improves, but multi-threaded workload performance suffers due to multiple cores accessing shared cache lines

Engineering Contradiction:
Improvecache utilityVSAvoidmulti-threaded workload performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent applies different cache management qualities to different cache lines based on their sharing characteristics. Shared cache lines receive preferential treatment with a policy that prevents replacement when the sticky bit is set, while private cache lines follow standard LRU replacement. This local differentiation optimizes performance for multi-threaded workloads that access shared data.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The patent introduces the sticky bit as an intermediary mechanism that mediates between exclusive and inclusive cache management approaches. This bit acts as a flag that triggers alternative replacement behavior, serving as a bridge between the two management philosophies and enabling context-dependent policy selection.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Device complexity

If standard LRU replacement policy is used in shared cache, then implementation simplicity is maintained, but replacement decisions become suboptimal due to inability to distinguish shared versus private data

Engineering Contradiction:
Improvereplacement policy complexityVSAvoidcache replacement efficiency
Core Design Contradiction:
Device complexityVSProductivity

Solution Approach 1:

The patent performs preliminary classification of cache lines as shared or private using the sticky bit before replacement decisions are made. When a cache line is first accessed by multiple cores, the sticky bit is set in advance, pre-marking it for protected status. This preliminary action simplifies subsequent replacement decisions by providing clear classification information.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The cache replacement system serves itself by using information already present in the cache (the sticky bit and allocation core identification) to make replacement decisions. The existing cache metadata structure is leveraged to provide the classification information needed for optimized replacement without requiring external control logic.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS7640399B1Mostly exclusive shared cache management policies
Publication Date: 2009.12.29 ADVANCED MICRO DEVICES INC
  • US7640399B1 patent drawing
  • US7640399B1 patent drawing
  • US7640399B1 patent drawing

AI summary

A system and method for managing a memory system. A system includes a plurality of processing entities and a cache which is shared by the processing entities. Responsive to a replacement event, circuitry may identify data entries of the shared cache which are candidates for replacement. Data entries which have been identified as candidates for replacement may be removed as candidates for replacement in response to detecting the data entry corresponds to data which is shared by at least two of the plurality of processing entities. The circuitry may maintain an indication as to which of the processing entities caused an initial allocation of data into the shared cache. When the circuitry detects that a particular data item is accessed by a processing entity other than a processing entity which caused an allocation of the given data item, the data item may be deemed classified as shared data.