Kernel Same-page Merging Delta Records for Memory Deduplication

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current Kernel Same-page Merging (KSM) techniques miss opportunities for merging similar pages, consume CPU resources, and are vulnerable to timing attacks, leading to inefficient memory deduplication and security threats in cloud computing environments.

Innovation Solution

The use of delta records and Intel Data Streaming Accelerator (DSA) to efficiently merge similar pages, offload CPU-intensive operations, and delay the unmerging process, thereby enhancing memory deduplication and security by tracking differences and obfuscating the unmerge process.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Quantity of substance

If KSM merges only identical pages, then memory deduplication is achieved, but similar pages are missed and memory savings are suboptimal

Engineering Contradiction:
Improvememory savingsVSAvoidmerging capability
Core Design Contradiction:
Quantity of substanceVSAdaptability or versatility

Solution Approach 1:

The patent changes the merging criterion from exact identity to similarity based on delta records. Pages are merged if their delta records (representing differences) are below a threshold, allowing flexible adjustment of similarity thresholds to balance memory savings against merging complexity.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

Delta records serve as an intermediary representation between pages. Instead of directly comparing entire pages, the system uses delta records to capture differences, enabling efficient similarity-based merging without copying full page contents.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Quantity of substance

If KSM performs page merging operations, then memory deduplication is achieved, but CPU resources are consumed

Engineering Contradiction:
Improvememory savingsVSAvoidCPU resources
Core Design Contradiction:
Quantity of substanceVSUse of energy by moving object

Solution Approach 1:

The system performs preliminary actions by creating delta records during normal memory operations. These delta records are accumulated and processed in batches, reducing the frequency of CPU-intensive merging operations while maintaining continuous memory deduplication capability.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The kernel automatically manages delta record creation and merging without requiring external CPU intervention. The system self-regulates by monitoring memory accesses and autonomously deciding when merging is beneficial, reducing overall CPU resource consumption.

Inventive Principle:
Principle #25Self-service

3Productivity

If KSM merges pages quickly, then memory deduplication efficiency is improved, but timing attacks can expose data

Engineering Contradiction:
Improvededuplication efficiencyVSAvoidtiming attack vulnerability
Core Design Contradiction:
ProductivityVSObject-affected harmful factors

Solution Approach 1:

The system uses feedback from memory access patterns and delta record analysis to dynamically adjust merging behavior. By monitoring which pages are merged and when, the system can obfuscate timing patterns that would otherwise expose data to attackers while maintaining efficient deduplication.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The merging process is made dynamic and adaptive rather than static. Pages are merged based on changing memory access patterns and delta record characteristics, allowing the system to adjust timing and behavior to prevent predictable timing attacks while maintaining productivity.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS20240004797A1Efficiently merging non-identical pages in kernel same-page merging (KSM) for efficient and improved memory deduplication and security
Publication Date: 2024.01.04 INTEL CORP
  • US20240004797A1 patent drawing
  • US20240004797A1 patent drawing
  • US20240004797A1 patent drawing

AI summary

Methods and apparatus for efficiently merging non-identical pages in Kernel Same-page Merging (KSM) for efficient and improved memory deduplication and security. The methods and apparatus identify memory pages with similar data and selectively merge those pages based on criteria such as a threshold. Memory pages in memory for a computing platform are scanned to identify pages storing similar but not identical data. A delta record between the similar memory pages is created, and it is determined whether a size of the delta (i.e., amount of content that is different) is less than a threshold. If so, the delta record is used to merge the pages. In one aspect, operations for creating delta records and merging the content of memory pages using delta records is offloaded from a platform's CPU. Support for memory reads and memory writes are provided utilizing delta records, including merging and unmerging pages under applicable conditions.