Dynamic Sequential Instruction Prefetching via Filter Queue

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Sequential instruction prefetching in data processing systems often results in cache pollution and reduced processor performance due to either excessive or insufficient prefetching of cache lines, leading to latency and thrashing in the instruction cache.

Innovation Solution

Implementing a dynamic sequential instruction prefetching technique using a prefetch filter queue and a backing array to accurately determine the number of sequential cache lines to prefetch, based on recent cache hits and misses, thereby optimizing prefetching and reducing unnecessary cache line loading.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Loss of time

If a sequential prefetcher statically prefetches two additional cache lines when a given cache line is prefetched, then processor wait states are reduced, but cache pollution occurs due to additional cache lines not being utilized prior to ejection

Engineering Contradiction:
Improveprocessor wait statesVSAvoidcache pollution
Core Design Contradiction:
Loss of timeVSObject-generated harmful factors

Solution Approach 1:

The patent implements a dynamic sequential instruction prefetching system that adjusts the number of cache lines to prefetch based on runtime observations. A filter queue tracks cache hits and misses for sequentially addressed cache lines, and a dynamic prefetch value is computed based on the hit/miss pattern. This allows the system to adapt the prefetch amount to actual workload characteristics, preventing cache pollution when sequential accesses are not occurring while maintaining performance when they are.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system changes the prefetch parameter dynamically based on observed cache behavior. Instead of using a fixed prefetch value, the system monitors cache hit/miss patterns and adjusts the number of sequential cache lines to prefetch accordingly. This parameter adaptation resolves the contradiction by matching prefetch intensity to actual demand, reducing cache pollution while maintaining processor efficiency.

Inventive Principle:
Principle #35Parameter changes

2Loss of time

If too many instruction cache lines are sequentially prefetched, then processor wait states are reduced, but processor performance is reduced by causing thrashing in the instruction cache

Engineering Contradiction:
Improveprocessor wait statesVSAvoidprocessor performance
Core Design Contradiction:
Loss of timeVSProductivity

Solution Approach 1:

The dynamic prefetching system adjusts the prefetch quantity based on runtime cache behavior observations. By monitoring hit/miss patterns in the filter queue, the system dynamically determines the optimal number of cache lines to prefetch, preventing thrashing caused by excessive prefetching while still reducing processor wait states through appropriate prefetching.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system uses feedback from cache hit/miss observations to adjust prefetch behavior. The filter queue records whether sequentially addressed cache lines are actually accessed, and this feedback information is used to compute a dynamic prefetch value. This closed-loop control prevents thrashing by reducing prefetch when sequential accesses don't occur while maintaining performance when they do.

Inventive Principle:
Principle #23Feedback

3Object-generated harmful factors

If too few instruction cache lines are sequentially prefetched, then cache pollution is reduced, but processor performance is reduced due to latency in executing instructions

Engineering Contradiction:
Improvecache pollutionVSAvoidprocessor performance
Core Design Contradiction:
Object-generated harmful factorsVSProductivity

Solution Approach 1:

The system dynamically adjusts prefetch quantity based on observed cache behavior, ensuring that enough cache lines are prefetched to maintain processor performance when sequential accesses occur, while avoiding excessive prefetching that would cause cache pollution. The dynamic prefetch value is computed from filter queue data reflecting actual access patterns.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The prefetch parameter is changed dynamically based on runtime observations of cache hit/miss patterns. When sequential accesses are detected, the prefetch value increases to maintain performance; when they are not detected, the prefetch value decreases to prevent cache pollution. This adaptive parameter adjustment resolves the contradiction between preventing pollution and maintaining performance.

Inventive Principle:
Principle #35Parameter changes

4Device complexity

If static sequential prefetching is implemented, then implementation complexity is reduced, but adaptability to different access patterns is poor

Engineering Contradiction:
Improveprefetching mechanism complexityVSAvoidadaptability to access patterns
Core Design Contradiction:
Device complexityVSAdaptability or versatility

Solution Approach 1:

The system implements dynamic prefetching by adding a filter queue to track cache hit/miss patterns and a dynamic prefetch value computation mechanism. This moderate increase in complexity enables the system to adapt to different sequential access patterns, determining the optimal number of cache lines to prefetch based on observed behavior rather than using a fixed static value.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system introduces feedback mechanisms through the filter queue that monitors cache access patterns and feeds this information back to adjust the prefetch value dynamically. This feedback loop provides adaptability to different access patterns while maintaining reasonable implementation complexity through structured observation and computation.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS10078514B2Techniques for dynamic sequential instruction prefetching
Publication Date: 2018.09.18 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US10078514B2 patent drawing
  • US10078514B2 patent drawing
  • US10078514B2 patent drawing

AI summary

A technique for operating a processor includes allocating an entry in a prefetch filter queue (PFQ) for a cache line address (CLA) in response to the CLA missing in an upper level instruction cache. In response to the CLA subsequently hitting in the upper level instruction cache, an associated prefetch value for the entry in the PFQ is updated. In response to the entry being aged-out of the PFQ, an entry in a backing array for the CLA and the associated prefetch value is allocated. In response to subsequently determining that prefetching is required for the CLA, the backing array is accessed to determine the associated prefetch value for the CLA. A cache line at the CLA and a number of sequential cache lines specified by the associated prefetch value in the backing array are then prefetched into the upper level instruction cache.