Kernel Recorder for Multicore Data Race Replay

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In multicore and multithreaded environments, non-deterministic data race conditions in shared memory lead to unpredictable outcomes, making it difficult to reproduce and debug issues due to their dependence on thread scheduling algorithms and I/O delays.

Innovation Solution

A hardware kernel recorder is coupled to processing cores and caches to record both deterministic and non-deterministic data race conditions, including silent writes from the kernel and drivers, allowing for replay during the debug process by monitoring cache snoop messages and switching between record-and-replay modes based on code execution contexts.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If multiple processing cores and threads are used to increase computing performance, then productivity is improved, but data race conditions occur making debugging difficult

Engineering Contradiction:
Improvecomputing performanceVSAvoiddebuggability
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent applies preliminary action by recording memory access transactions before debugging is needed. The recording mechanism continuously captures read and write operations to shared memory locations during normal execution, so when a data race condition is detected, the complete transaction history is already available for deterministic replay and analysis, eliminating the need to recreate the race condition.

Inventive Principle:
Principle #10Preliminary action

2Productivity

If thread scheduling algorithms are used to manage multithreaded execution, then productivity is improved, but non-deterministic data race conditions are created

Engineering Contradiction:
Improveexecution efficiencyVSAvoidexecution determinism
Core Design Contradiction:
ProductivityVSStability of the object's composition

Solution Approach 1:

The patent applies copying by creating a deterministic copy of the non-deterministic execution sequence. The recording mechanism captures the exact sequence of memory transactions including thread IDs, memory addresses, and timestamps, then replays this recorded sequence in a controlled manner that eliminates the influence of thread scheduling algorithms, allowing deterministic analysis of data race conditions.

Inventive Principle:
Principle #26Copying

3Difficulty of detecting and measuring

If hardware recording mechanisms are added to capture memory transactions, then debugging capability is improved, but device complexity increases

Engineering Contradiction:
Improvedata race detectionVSAvoidsystem architecture
Core Design Contradiction:
Difficulty of detecting and measuringVSDevice complexity

Solution Approach 1:

The patent applies universality by designing a recording mechanism that handles multiple types of memory operations (reads, writes, locks, unlocks) through a unified interface. The same recording infrastructure captures transactions from multiple threads and cores simultaneously, and supports both continuous recording and event-triggered recording modes, reducing overall system complexity despite the enhanced functionality.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentUS10649899B2Multicore memory data recorder for kernel module
Publication Date: 2020.05.12 INTEL CORP
  • US10649899B2 patent drawing
  • US10649899B2 patent drawing
  • US10649899B2 patent drawing

AI summary

A processing device includes a processing core, coupled to a memory, to execute a task including a code segment identified as being monitored and a kernel recorder, coupled to the processing core via a core interface. The kernel recorder includes a first filter circuit to responsive to determining that the task being executed enters the code segment, set the kernel recorder to a first mode under which the kernel recorder is to record, in a first record, a plurality of memory addresses accessed by the code segment, and responsive to determining that the execution of the task exits the code segment, set the kernel recorder to a second mode under which the kernel recorder is to detect a write operation to a memory address recorded in the first record and record the memory address in a second record.