Block-Permission Task Stealing in Ring Queues to Cut Cache Misses

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In scenarios where multiple processor cores process tasks concurrently, existing load balancing mechanisms lead to high performance overheads and reduced reliability due to cache misses during task stealing operations in ring queues.

Innovation Solution

Implementing a block management mechanism on ring queues that allows task stealing from blocks with specific permissions, reducing synchronization overheads by using intra-block metadata and minimizing contention between processor cores.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If a processor core performs task stealing from a ring queue using global metadata, then task stealing functionality is achieved, but cache misses occur and performance overhead increases

Engineering Contradiction:
Improvetask stealing efficiencyVSAvoidsystem performance
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The ring queue is divided into multiple blocks, each with its own metadata structure. This segmentation allows task stealing operations to access local block metadata rather than global queue metadata, reducing cache conflicts and improving performance while maintaining task stealing functionality

Inventive Principle:
Principle #1Segmentation

2Productivity

If task stealing is performed from the queue head or tail of the ring queue, then task stealing is implemented, but competition between different processor cores increases

Engineering Contradiction:
Improvetask processing throughputVSAvoidsystem reliability
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

Different blocks within the ring queue are assigned different stealing permissions (front-stealable, middle-stealable, back-stealable). This local differentiation reduces competition between processor cores by allowing distributed access points throughout the queue rather than concentrating all stealing operations at the head or tail

Inventive Principle:
Principle #3Local quality

3Productivity

If block management mechanism is implemented with intra-block metadata, then synchronization overhead is reduced, but device complexity increases

Engineering Contradiction:
Improvesystem performanceVSAvoidring queue structure
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The ring queue metadata is segmented into block-level structures with intra-block metadata containing stealing counters and position information. This segmentation enables parallel access and reduces synchronization overhead, as each block can be independently managed without requiring global metadata locks

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

Blocks are pre-configured with stealing permissions and metadata structures before task stealing operations begin. This preliminary setup allows processor cores to immediately perform stealing operations on permitted blocks without requiring complex runtime synchronization or metadata updates

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentEP4682718A1Task stealing method and apparatus, chip, and computer device
Publication Date: 2026.01.21 HUAWEI TECH CO LTD
  • EP4682718A1 patent drawingFigure 1
  • EP4682718A1 patent drawingFigure 2
  • EP4682718A1 patent drawingFigure 3(a)~3(b)

AI summary

A task stealing method and apparatus, a chip, and a computer device are disclosed, and relate to the computer field. The computer device includes a plurality of processor cores, the plurality of processor cores include a first processor core and a second processor core, the method is performed by the first processor core, and the method includes: when a ring queue associated with the first processor core is empty, stealing a to-be-processed first task from a first block that has stealing permission and that is in a ring queue associated with the second processor core, and processing the first task. In this way, block management is performed, by using a block management mechanism, on the ring queue associated with the processor core, so that the task is allowed to be stolen starting from the block that has the stealing permission and that is in the ring queue, and a write operation or an obtaining operation may also be performed on another block in the ring queue. Compared with obtaining a task from a queue head or a queue tail of the ring queue, this reduces a possibility that different processor cores compete to perform different operations on a same ring queue, thereby improving system performance and reliability of task stealing.