Adaptive GPU Preemption Granularity for Context Switching

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Modern graphics processing systems face challenges in efficiently preempting lower-priority GPU command streams to meet scheduling deadlines for higher-priority streams, as existing preemption methods incur significant overhead in context switching and may not provide fine enough granularity to ensure timely execution.

Innovation Solution

The GPU issues preemption commands at varying levels of granularity, starting with a coarse granularity and escalating to finer granularities if necessary, to interrupt lower-priority command streams and ensure higher-priority streams meet their scheduling deadlines while minimizing context switching overhead.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If the GPU uses preemption to interrupt lower-priority command streams, then higher-priority streams can meet scheduling deadlines, but context switching overhead increases

Engineering Contradiction:
Improvescheduling deadline meetingVSAvoidcontext switching overhead
Core Design Contradiction:
ReliabilityVSLoss of energy

Solution Approach 1:

The patent implements dynamic preemption granularity adjustment where the GPU adapts the level of preemption based on the specific scheduling situation. The system can operate at coarse granularity when deadlines are not urgent, reducing overhead, and switch to fine granularity only when necessary to meet critical deadlines, thus resolving the contradiction between reliability and energy loss

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent changes the preemption granularity parameter dynamically based on scheduling needs. By adjusting this parameter between coarse and fine levels, the system optimizes the balance between ensuring deadline meeting (reliability) and minimizing context switching overhead (energy loss)

Inventive Principle:
Principle #35Parameter changes

2Adaptability or versatility

If the GPU uses fine-grained preemption, then scheduling flexibility improves, but context switching overhead increases

Engineering Contradiction:
Improvescheduling flexibilityVSAvoidcontext switching overhead
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The system dynamically adjusts preemption granularity based on the scheduling situation. When flexibility is needed but not critical, the system uses coarse-grained preemption. Only when tight deadlines require fine-grained control does the system switch to finer granularity, thus maintaining adaptability while minimizing unnecessary overhead

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent applies partial preemption only when necessary rather than always using fine-grained preemption. This selective application of fine-grained preemption provides sufficient scheduling flexibility for critical cases while avoiding the excessive overhead that would result from continuous fine-grained operation

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS10210593B2Adaptive context switching
Publication Date: 2019.02.19 QUALCOMM INC
  • US10210593B2 patent drawing
  • US10210593B2 patent drawing
  • US10210593B2 patent drawing

AI summary

A graphics processing unit (GPU) may dispatch a first set of commands for execution on one or more processing units of the GPU. The GPU may receive notification from a host device indicating that a second set of commands are ready to execute on the GPU. In response, the GPU may issue a first preemption command at a first preemption granularity to the one or more processing units. In response to the GPU failing to preempt execution of the first set of commands within an elapsed time period after issuing the first preemption command, the GPU may issue a second preemption command at a second preemption granularity to the one or more processing units, where the second preemption granularity is finer-grained than the first preemption granularity.