Reverse Slot Invalidation for Ring Buffer Cache Optimization

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current techniques for parallelizing packet reception and copying in computer systems, such as those used in forwarding network traffic to virtual machines, suffer from performance bottlenecks due to cache line bounces and inefficiencies in ring buffer designs, leading to slower packet copying and reduced throughput.

Innovation Solution

Implementing a method where a consumer processor retrieves and invalidates memory entries in batches from a ring buffer, rather than individually, to reduce cache line bounces and improve performance without increasing the ring buffer size, by testing values and walking the ring buffer backwards to invalidate slots en masse.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If a consumer processor retrieves and invalidates memory entries individually from a ring buffer, then the ring buffer design remains simple, but cache line bounces increase and throughput decreases

Engineering Contradiction:
Improvepacket throughputVSAvoidring buffer invalidation complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent merges multiple invalidation operations into a single batch operation. Instead of invalidating one memory entry at a time, the consumer processor retrieves a batch of entries (e.g., 4-8 entries) and invalidates them collectively by updating the producer index once, thereby reducing cache line bounces and improving throughput

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The consumer processor performs preliminary retrieval of multiple memory entries before invalidation occurs. By pre-fetching a batch of entries into local storage and only then invalidating the ring buffer slots, the system reduces the frequency of cache line bounces between the consumer and producer processors

Inventive Principle:
Principle #10Preliminary action

2Productivity

If the ring buffer size is increased to reduce cache line bounces, then packet throughput improves, but memory usage increases

Engineering Contradiction:
Improvepacket throughputVSAvoidmemory buffer size
Core Design Contradiction:
ProductivityVSQuantity of substance

Solution Approach 1:

The patent segments the ring buffer into batches of memory entries that can be processed together. By organizing entries into manageable batches (e.g., 4-8 entries per batch), the system reduces cache line bounces without requiring a larger overall buffer, as each batch is processed and invalidated independently

Inventive Principle:
Principle #1Segmentation

3Productivity

If parallel processing is implemented for packet reception and copying, then throughput improves, but cache line bounces between processors increase

Engineering Contradiction:
Improvepacket throughputVSAvoidcache line bounce overhead
Core Design Contradiction:
ProductivityVSLoss of energy

Solution Approach 1:

The patent merges multiple cache-accessing operations into a single batch invalidation. The consumer processor updates the producer index once per batch rather than once per entry, significantly reducing the number of cache line bounces between parallel processors while maintaining throughput benefits

Inventive Principle:
Principle #5Merging (Combining)

Data Source

PatentUS20190065099A1Reverse slot invalidation for pointer rings
Publication Date: 2019.02.28 RED HAT INC
  • US20190065099A1 patent drawing
  • US20190065099A1 patent drawing
  • US20190065099A1 patent drawing

AI summary

A reverse slot invalidation system includes a first memory including a ring buffer, second memory, and processor in communication with the first memory. The processor includes a consumer processor and a producer processor. The consumer processor is configured to detect a request to record a memory entry in the second memory, retrieve up to a predetermined quantity of memory entries in the ring buffer from an original slot to an end slot, and test a respective value of each successive slot from the original slot through the end slot while the respective value of each successive slot in the ring buffer remains unchanged. The consumer processor is configured to record respective valid values in the second memory. Additionally, the consumer processor is configured to walk the ring buffer backwards from the end slot to the original slot, and invalidate each slot between the end slot and the original slot.