Lock-Free Queue for Debug Trace Accumulation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing networking systems, such as sub-station gateway systems, often face performance issues due to debug information generation, which is typically turned off to prevent performance impact, leading to a lack of error trace retention and difficulty in error diagnosis.

Innovation Solution

A multi-producer single-consumer lock-free queue is implemented to accumulate debug traces without impacting system performance, allowing traces to be stored in batches and retrieved from non-volatile storage, enabling continuous trace generation and post-error analysis.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Loss of information

If debug information is written to serial output ports, then error trace retention is improved, but system performance deteriorates

Engineering Contradiction:
Improveerror trace retentionVSAvoidsystem performance
Core Design Contradiction:
Loss of informationVSProductivity

Solution Approach 1:

The patent introduces a lock-free queue as an intermediary buffer between the debug information generation source and the serial output port. This queue accumulates traces in memory without blocking the generating process, and releases them to the serial port asynchronously, thus preventing performance degradation while ensuring trace retention.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent implements preliminary action by pre-allocating a lock-free queue buffer in memory to accumulate debug traces before they are written to the serial output port. This allows traces to be captured and stored in advance during normal operation, and then flushed to the serial port when appropriate, eliminating the need to write to serial port in real-time and thus avoiding performance impact.

Inventive Principle:
Principle #10Preliminary action

2Loss of information

If debug information is retained in memory, then error diagnosis capability is improved, but memory usage increases

Engineering Contradiction:
Improvedebug information retentionVSAvoidmemory usage
Core Design Contradiction:
Loss of informationVSQuantity of substance

Solution Approach 1:

The patent applies parameter changes by making the queue buffer size a configurable parameter rather than a fixed value. This allows the system to adjust the amount of memory allocated for trace accumulation based on specific needs, balancing between trace retention capability and memory consumption. The lock-free queue structure also enables efficient memory management with configurable buffer capacities.

Inventive Principle:
Principle #35Parameter changes

3Productivity

If lock-free queue with reference counting is implemented, then trace accumulation without performance impact is achieved, but device complexity increases

Engineering Contradiction:
Improvetrace generation rateVSAvoidqueue structure complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent implements self-service through automatic reference counting mechanisms within the lock-free queue structure. The queue automatically manages the reference counts of stored trace objects, incrementing when objects are added and decrementing when removed or expired. This automated memory management eliminates the need for manual intervention and complex synchronization primitives, achieving high-performance trace accumulation with relatively simple queue operations.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS10514997B2Multi-producer single consumer lock-free queues with producer reference counting
Publication Date: 2019.12.24 EATON INTELLIGENT POWER LTD
  • US10514997B2 patent drawing
  • US10514997B2 patent drawing
  • US10514997B2 patent drawing

AI summary

Systems and methods associated with a multi-producer single consumer lock-free queue capable of accumulating traces is described herein. In a non-limiting embodiment, data is determined to be allocated, and a first head/tail pair indicating a location along a queue is received, the location indicating where a data bucket is able to be placed. A first data bucket to use for storing the data is determined, and the data is stored using the first data bucket. The first data bucket is then placed on the queue, and a first instruction to decrement a first reference count for the first head/tail pair is generated.