L1 Cache Victim Buffer Snoop Handling for DMA Coherence

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In multi-level cache systems, cache coherence is broken when a higher level cache line is evicted, leading to incorrect DMA data commitment and missed writes due to conflicts between Level 1 and Level 2 cache operations, particularly during DMA accesses.

Innovation Solution

Implementing a victim buffer mechanism where evicted cache line data is stored and compared with DMA write addresses, with shadow tags used to determine cache presence before sending snoop writes, ensuring coherent data transfer between cache levels.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If a higher level cache line is evicted during normal cache operation, then cache space is freed for new data, but cache coherence is broken leading to incorrect DMA data commitment

Engineering Contradiction:
Improvecache eviction efficiencyVSAvoidcache coherence
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent applies preliminary action by comparing the DMA write address against the victim buffer address before the eviction is complete. This pre-comparison allows the system to identify potential coherence conflicts in advance and prevent incorrect data commitment before it occurs, maintaining cache coherence while allowing normal eviction operations to proceed.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The victim buffer acts as an intermediary structure between the higher level cache and the DMA operation. By storing evicted cache line data in this intermediate buffer and comparing DMA addresses against it, the system mediates between the conflicting operations of cache eviction and DMA writes, ensuring coherence is maintained without blocking either operation unnecessarily.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If a snoop write is sent to Level 1 cache during victim eviction, then DMA data is written to cache, but the write is dropped because the victim has already been evicted

Engineering Contradiction:
ImproveDMA data commitmentVSAvoidwrite completion time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system performs preliminary comparison of the snoop write address with victim buffer addresses before the eviction completes. This allows the system to anticipate whether a snoop write will be needed and prepare accordingly, preventing the write drop issue while minimizing delays to DMA operation completion.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent implements dynamic handling of snoop writes by conditionally blocking or allowing writes based on real-time comparison with the victim buffer. Rather than using a static approach that would either always block or always allow writes, the system dynamically adjusts its behavior based on whether the snoop address matches an evicted line, optimizing both reliability and timing.

Inventive Principle:
Principle #15Dynamics

3Speed

If DMA write address is not compared with victim buffer, then DMA operation proceeds quickly, but data corruption occurs due to coherence violations

Engineering Contradiction:
ImproveDMA operation speedVSAvoiddata integrity
Core Design Contradiction:
SpeedVSReliability

Solution Approach 1:

The patent applies partial action by comparing DMA addresses only against the victim buffer addresses rather than performing a full cache coherence check. This partial comparison is sufficient to prevent data corruption from evicted lines while being much faster than comprehensive coherence protocols, thus maintaining both speed and reliability.

Inventive Principle:
Principle #16Partial or excessive action

Solution Approach 2:

The system replaces complex mechanical coherence checking mechanisms with a simpler address comparison operation against the victim buffer. This substitution maintains data integrity through address matching while significantly reducing the time and complexity overhead compared to traditional coherence protocols.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Data Source

PatentUS9003122B2Level one data cache line lock and enhanced snoop protocol during cache victims and writebacks to maintain level one data cache and level two cache coherence
Publication Date: 2015.04.07 TEXAS INSTRUMENTS INC
  • US9003122B2 patent drawing
  • US9003122B2 patent drawing
  • US9003122B2 patent drawing

AI summary

This invention assures cache coherence in a multi-level cache system upon eviction of a higher level cache line. A victim buffer stored data on evicted lines. On a DMA access that may be cached in the higher level cache the lower level cache sends a snoop write. The address of this snoop write is compared with the victim buffer. On a hit in the victim buffer the write completes in the victim buffer. When the victim data passes to the next cache level it is written into a second victim buffer to be retired when the data is committed to cache. DMA write addresses are compared to addresses in this second victim buffer. On a match the write takes place in the second victim buffer. On a failure to match the controller sends a snoop write.