Random Cache Line Selection for Virtualization Memory Duplication

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In virtualization systems, the existing memory duplication mechanisms are resource and time-consuming due to full memory page comparisons, which burden the CPU cache and processing resources when identifying identical memory pages.

Innovation Solution

Implementing a secondary data structure that indexes memory pages using a subset of each page, allowing for faster comparison by checking a smaller portion of the memory page, with the option to perform a full page comparison only if a match is found in the secondary data structure.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If full memory page comparison is performed to identify identical memory pages, then memory duplication accuracy is improved, but CPU cache usage and processing time increase

Engineering Contradiction:
Improvememory page comparison accuracyVSAvoidcomparison time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent divides a memory page into multiple cache line-sized segments. Instead of comparing entire memory pages (typically 4KB), the system compares individual cache lines (typically 64 bytes). This segmentation reduces the comparison data size by a factor of 64, allowing faster identification of identical memory pages while maintaining accuracy through subsequent full-page verification only when cache line matches are found.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent implements partial comparison by examining only a subset of memory page contents (specific cache lines) rather than performing complete memory page comparisons. This partial action serves as a filtering mechanism: if cache lines don't match, the entire page comparison is avoided. Only when cache line matches are found does the system perform the excessive action of full page verification to ensure accuracy.

Inventive Principle:
Principle #16Partial or excessive action

2Reliability

If full memory page comparison is performed to ensure accurate memory duplication, then memory duplication reliability is improved, but CPU processing resources are consumed

Engineering Contradiction:
Improvememory duplication reliabilityVSAvoidCPU processing power
Core Design Contradiction:
ReliabilityVSPower

Solution Approach 1:

The patent segments the memory comparison task into two stages: first comparing individual cache lines (64 bytes each) and then performing full page comparison only when cache lines match. This segmentation reduces CPU processing power consumption by avoiding unnecessary full-page comparisons for non-identical memory pages, while maintaining duplication reliability through the two-stage verification process.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system performs partial comparison (cache line level) as a preliminary filter before committing to full page comparison. This partial action significantly reduces CPU processing power requirements by eliminating most comparison operations early, while the excessive action (full page comparison) is performed only when necessary to ensure duplication reliability.

Inventive Principle:
Principle #16Partial or excessive action

3Measurement precision

If entire memory page contents are used for comparison, then identification accuracy is improved, but memory bandwidth and cache usage increase

Engineering Contradiction:
Improveidentification accuracyVSAvoiddata volume for comparison
Core Design Contradiction:
Measurement precisionVSQuantity of substance

Solution Approach 1:

The patent segments memory pages into cache line-sized units for comparison purposes. Instead of loading and comparing entire 4KB memory pages, the system loads and compares only relevant 64-byte cache lines. This segmentation reduces the quantity of data volume required for comparison by a factor of 64, improving memory bandwidth efficiency and cache utilization while maintaining identification accuracy through selective verification.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS8756383B2Random cache line selection in virtualization systems
Publication Date: 2014.06.17 RED HAT ISRAEL
  • US8756383B2 patent drawing
  • US8756383B2 patent drawing
  • US8756383B2 patent drawing

AI summary

A mechanism for random cache line selection in virtualization systems is disclosed. A method includes maintaining a secondary data structure representing a plurality of memory pages, the secondary data structure indexed by a subset of each memory page, determining an index of a received new memory page by utilizing a subset of the new memory page that is a same size and at a same offset as the subset of each memory page, comparing the index of the new memory page with the indices of the secondary data structure for a match, utilizing a main data structure to perform a full page memory comparison with the new memory page if a match is found in the secondary data structure, and updating at least one of the size of the subset, the number of subsets, and the offsets of the subsets used to index the memory page.