Lockless Receive Buffer Allocation via Segmented Refill Queues

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing network interface solutions strain the memory subsystem by using a single core to allocate all buffers and rely on locking mechanisms, which increases processor utilization and slows down data processing due to contention.

Innovation Solution

Implementing a lockless solution with multiple refill or intermediary queues that allocate and post receive buffers across multiple cores without locking, allowing efficient allocation and posting of buffers to a buffer queue without blocking or locking any thread.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Device complexity

If a single core is used to allocate all buffers, then buffer allocation is simplified, but the memory subsystem is strained and processor utilization increases

Engineering Contradiction:
Improvebuffer allocation complexityVSAvoiddata processing efficiency
Core Design Contradiction:
Device complexityVSProductivity

Solution Approach 1:

The patent divides the buffer allocation task into multiple segments by creating separate refill queues for different cores. Each core has its own refill queue that can independently allocate buffers, eliminating the bottleneck of a single core managing all buffers. This segmentation allows parallel buffer allocation while reducing memory subsystem strain.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces refill queues as intermediary structures between cores and the buffer pool. These queues act as mediators that decouple the buffer allocation process from direct memory access, allowing multiple cores to request buffers asynchronously without contending for the same memory resources simultaneously.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If locking mechanisms are used to manage buffer queues, then thread safety is ensured, but processor utilization increases and data processing slows down due to contention

Engineering Contradiction:
Improvethread safetyVSAvoiddata processing speed
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent implements self-service mechanisms where each core independently manages its own refill queue without requiring locks. The per-core queues are designed to be inherently thread-safe through their structure and access patterns, eliminating the need for locking mechanisms and the associated processor utilization overhead.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

By segmenting the buffer management into per-core refill queues, the patent eliminates contention for shared resources. Each queue is exclusively accessed by its owning core, removing the need for locking mechanisms that would otherwise be required to ensure thread safety in a shared queue structure.

Inventive Principle:
Principle #1Segmentation

3Reliability

If a lock is used on the buffer queue, then access safety is guaranteed, but processors must wait idle until the resource is unlocked

Engineering Contradiction:
Improveresource access safetyVSAvoidprocessor idle time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent segments the buffer queue into multiple per-core refill queues, allowing processors to access their own dedicated queue without waiting for locks. This eliminates processor idle time while maintaining access safety through exclusive per-core ownership of each queue.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent performs preliminary actions by pre-allocating and organizing buffers in per-core refill queues before they are needed. This allows processors to immediately access ready-to-use buffers from their own queues without waiting for lock acquisition or buffer allocation, eliminating idle time while ensuring safe access.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS11681625B2Receive buffer management
Publication Date: 2023.06.20 INTEL CORP
  • US11681625B2 patent drawing
  • US11681625B2 patent drawing
  • US11681625B2 patent drawing

AI summary

Examples described herein can be used to allocate replacement receive buffers for use by a network interface, switch, or accelerator. Multiple refill queues can be used to receive identifications of available receive buffers. A refill processor can select one or more identifications from a refill queue and allocate the identifications to a buffer queue. None of the refill queues is locked from receiving identifications of available receive buffers but merely one of the refill buffers is accessed at a time to provide identifications of available receive buffers. Identifications of available receive buffers from the buffer queue are provide to the network interface, switch, or accelerator to store content of received packets.