Reverse Order Submission for Ring Buffer Cache Bounces
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current techniques for parallelizing network traffic reception and copying in computer systems face performance bottlenecks due to cache line bounces between producer and consumer processors, leading to inefficiencies and slowdowns, especially when the ring buffer is empty or nearly empty.
Innovation Solution
The proposed solution involves a producer processor that receives a batch of memory entries and walks the ring buffer backwards to store them in empty slots, allowing multiple entries to be produced before cache line bounces occur, thereby reducing the frequency of cache line bounces and improving performance without increasing the ring buffer size.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If the producer processor stores memory entries in the ring buffer in traditional forward order, then the ring buffer operates correctly as a FIFO structure, but cache line bounces occur frequently between producer and consumer processors leading to performance slowdowns
Solution Approach 1:
The patent applies reverse order submission by storing memory entries in the ring buffer in reverse order (from last to first) instead of the traditional forward order. The producer processor identifies the last memory entry that can be stored in an invalid slot, then walks backwards through the ring buffer storing entries in reverse sequence. This inversion allows the consumer processor to read entries in the correct forward order while the producer writes in reverse, reducing cache line bounces and improving throughput by approximately ten percent or more
2Productivity
If the ring buffer size is increased to reduce cache line bounces, then more memory entries can be produced before bounces occur, but the device complexity and memory usage increase
Solution Approach 1:
Instead of increasing the ring buffer size to reduce cache line bounces, the patent inverts the submission order to reverse order submission. This allows the system to achieve the benefit of producing more entries before cache line bounces without increasing the ring buffer size, thereby avoiding increased device complexity and memory usage while still improving productivity
Data Source
AI summary
A reverse order submission system includes a first memory including a ring buffer, a second memory, and a processor in communication with the first memory. The processor includes a consumer processor and a producer processor, and the producer processor is configured to receive a batch of memory entries. Further, the producer processor is configured to identify a last memory entry in the batch that can be stored in an invalid value slot in the ring buffer, walk the ring buffer backwards, and store each respective memory entry in each respective slot from an end slot to the original slot in the ring buffer. The end slot is a slot associated with the final memory entry ending the batch of memory entries or a slot preceding a valid value slot.


