Cache Address Mapping for N-Way Set Associative Conflict Resolution

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current cache hardware architectures face performance degradation due to cache access conflicts when multiple programs contend for limited cache resources, particularly in N-way set associative structures, where increasing cache capacity and ways is hindered by hardware constraints like delay, power consumption, and cost.

Innovation Solution

The method involves identifying 'hot' functions in binary files, merging them into a special section, and using a loader to perform an offset operation that maps these hot sections to consecutive cache sets, minimizing cache conflicts by optimizing cache space usage and reducing the likelihood of cache misses.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If the cache capacity and quantity of ways are increased to reduce conflict misses, then the cache hit rate is improved, but the hardware complexity, power consumption, and cost increase

Engineering Contradiction:
Improvecache hit rateVSAvoidhardware complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent segments the cache address mapping process by introducing a page color mechanism that divides the address space into different color groups. This segmentation allows the cache to handle multiple programs with different color assignments, reducing conflicts without requiring additional cache capacity or ways.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent changes the mapping parameters by using page color information (derived from physical address bits) to determine cache set indexing. Instead of directly mapping all addresses uniformly, the system modifies the mapping behavior based on the color parameter, enabling multiple programs to coexist with reduced conflicts while using the same cache resources.

Inventive Principle:
Principle #35Parameter changes

2Reliability

If the cache capacity and quantity of ways are increased to reduce conflict misses, then the cache hit rate is improved, but the power consumption increases

Engineering Contradiction:
Improvecache hit rateVSAvoidpower consumption
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

The patent segments the cache address mapping process by introducing a page color mechanism that divides the address space into different color groups. This segmentation allows the cache to handle multiple programs with different color assignments, reducing conflicts without requiring additional cache capacity or ways.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent changes the mapping parameters by using page color information (derived from physical address bits) to determine cache set indexing. Instead of directly mapping all addresses uniformly, the system modifies the mapping behavior based on the color parameter, enabling multiple programs to coexist with reduced conflicts while using the same cache resources.

Inventive Principle:
Principle #35Parameter changes

3Reliability

If the cache capacity and quantity of ways are increased to reduce conflict misses, then the cache hit rate is improved, but the cost increases

Engineering Contradiction:
Improvecache hit rateVSAvoidcost
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent segments the cache address mapping process by introducing a page color mechanism that divides the address space into different color groups. This segmentation allows the cache to handle multiple programs with different color assignments, reducing conflicts without requiring additional cache capacity or ways.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent changes the mapping parameters by using page color information (derived from physical address bits) to determine cache set indexing. Instead of directly mapping all addresses uniformly, the system modifies the mapping behavior based on the color parameter, enabling multiple programs to coexist with reduced conflicts while using the same cache resources.

Inventive Principle:
Principle #35Parameter changes

4Reliability

If page coloring is used to control cache access by different working sets, then cache conflicts are reduced, but the device complexity increases

Engineering Contradiction:
Improvecache conflict reductionVSAvoiddevice complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent implements self-service by automatically assigning page colors based on the lowest few bits of the physical address. The system does not require manual configuration or complex control logic; instead, the page color is derived directly from the address itself, and the cache mapping automatically adapts based on this color information.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The patent changes the mapping parameters by using page color information (derived from physical address bits) to determine cache set indexing. Instead of directly mapping all addresses uniformly, the system modifies the mapping behavior based on the color parameter, enabling multiple programs to coexist with reduced conflicts while using the same cache resources.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentEP3690660B1Cache address mapping method and related device
Publication Date: 2023.05.31 HUAWEI TECH CO LTD
  • EP3690660B1 patent drawingFigure 1
  • EP3690660B1 patent drawingFigure 2
  • EP3690660B1 patent drawingFigure 3

AI summary

This application discloses a cache cache address mapping method and a related device. The method includes: obtaining a binary file, where the binary file includes a first hot section; obtaining alignment information of a second hot section, where the second hot section is a hot section that has been loaded into the cache, and the alignment information includes a set index of a last cache set occupied by the second hot section after the second hot section is loaded into the cache; and performing an offset operation on the first hot section based on the alignment information, so that the first hot section is mapped to cache sets with consecutive set indexes in the cache, and the cache sets with consecutive set indexes are adjacent to the last cache set. According to embodiments of the present invention, a problem of a conflict miss of a cache in an N-way set associative structure can be resolved without increasing physical hardware overheads, thereby improving a cache hit rate.