Simultaneous Multithreading Processor Stall Reduction via Thread Switching

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing techniques fail to effectively suppress pipeline stalls caused by data dependencies other than register dependencies in out-of-order processors, leading to performance degradation during simultaneous multithreading.

Innovation Solution

Identifying data-dependent stalled instructions and inserting a thread-switching instruction to fetch from a different thread, ensuring data availability before executing the stalled instruction, thereby avoiding stalls.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If out-of-order execution is used to improve instruction execution efficiency, then processor performance is improved, but pipeline stalls occur due to data dependencies

Engineering Contradiction:
Improveinstruction execution efficiencyVSAvoidpipeline stall
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent applies preliminary action by detecting data dependencies before instruction execution and proactively inserting thread-switching instructions to prepare data in advance. The system identifies when an instruction depends on data that will be ready in future cycles and preemptively switches threads to fetch the needed data, eliminating stalls before they occur rather than reacting after stalls happen.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent uses thread-switching instructions as intermediaries between the stalled instruction and the data dependency resolution. When a data dependency stall is detected, the system inserts a thread-switching instruction that acts as a mediator to switch execution to another thread, allowing the stalled thread to resume only after the dependent data is fetched and ready, thus bridging the gap between current execution state and data availability.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Duration of action of moving object

If thread-switching instructions are inserted to hide long-latency instructions, then execution continuity is improved, but stalls caused by data dependencies other than register dependencies cannot be suppressed

Engineering Contradiction:
Improveexecution continuityVSAvoiddata dependency resolution
Core Design Contradiction:
Duration of action of moving objectVSReliability

Solution Approach 1:

The patent implements feedback by continuously monitoring data dependency status during instruction execution. When a stall is detected due to unresolved data dependencies, the system analyzes which thread holds the needed data and feedback-driven thread switching is performed. This closed-loop approach ensures that thread switching is not arbitrary but based on real-time dependency resolution needs, improving both continuity and reliability.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The patent applies dynamics by making the thread selection adaptive and flexible rather than fixed. The system dynamically determines which thread to switch to based on current data dependency status, execution progress, and data availability predictions. This dynamic adjustment allows the system to respond to varying dependency patterns and optimize execution continuity while ensuring reliable data resolution.

Inventive Principle:
Principle #15Dynamics

3Productivity

If data dependencies are analyzed across functions and software elements to optimize code, then stall reduction is improved, but analysis complexity increases

Engineering Contradiction:
Improvestall reductionVSAvoiddependency analysis complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent applies segmentation by dividing the complex dependency analysis into manageable units at the instruction level within threads. Rather than analyzing entire functions and software elements simultaneously, the system segments the analysis to focus on individual instructions and their immediate data dependencies. This segmentation reduces the complexity of analysis while still achieving effective stall reduction through localized optimization.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent implements self-service by having the execution system automatically detect and resolve data dependencies without requiring external software optimization. The hardware execution unit autonomously analyzes its own dependency status, identifies when data will be ready, and inserts thread-switching instructions as needed. This self-service approach eliminates the need for complex external code analysis while achieving stall reduction.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS10114645B2Reducing stalling in a simultaneous multithreading processor by inserting thread switches for instructions likely to stall
Publication Date: 2018.10.30 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US10114645B2 patent drawing
  • US10114645B2 patent drawing
  • US10114645B2 patent drawing

AI summary

A technique suppresses the occurrence of stalling caused by data dependency other than register dependency in an out-of-order processor. A stall reducing program includes a handler for detecting a stall occurring during execution of execution code using a performance monitoring unit, and identifying, based on dependencies, a second instruction on which a first instruction is data dependent, the stall based on this dependency; a profiler registering the second instruction as profile information; and an optimization module for inserting a thread yield instruction in the appropriate position inside the execution code or original code file based on the profile information, and outputting the optimized execution code.