Atomic Copy-XOR Instruction for VM Checkpointing

Solution Overview

Problem

Current virtual machine checkpointing operations in virtualized environments face significant challenges with high compute and memory bandwidth consumption, as well as cache pollution, due to the need to transfer large amounts of data during delta calculations between VM images.

Innovation Solution

The implementation of atomic-copy-xor instructions, which offload operations to hardware components like the memory controller, DIMM controller, or LLC engine, reducing IO and memory bandwidth usage and minimizing cache pollution by performing bit-wise XOR operations directly in these components.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If traditional software-based checkpointing operations are used to copy VM memory pages, then VM state can be preserved and restored, but compute and memory bandwidth consumption increases significantly

Engineering Contradiction:
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

The patent replaces software-based copy operations with hardware-based atomic instructions (copyxor, copyswap) that execute directly in the CPU or memory controller. This substitution of mechanical/software processing with hardware-level operations dramatically reduces compute overhead and memory bandwidth consumption while maintaining the reliability of VM state preservation during checkpointing operations.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

2Measurement precision

If large amounts of data are transferred during delta calculations between VM images, then checkpoint accuracy is maintained, but cache pollution increases

Engineering Contradiction:
Core Design Contradiction:
Measurement precisionVSObject-generated harmful factors

Solution Approach 1:

The patent extracts the delta calculation operation from the traditional software domain and implements it at the hardware level using atomic copy-xor instructions. This extraction allows the system to maintain checkpoint accuracy through precise bitwise comparison while avoiding the cache pollution that would result from traditional software-based data transfer and processing of large memory page sets.

Inventive Principle:
Principle #2Taking out (Extraction)

3Stability of the object's composition

If conventional copy operations are used to update memory pages during checkpointing, then VM state consistency is achieved, but IO bandwidth usage increases

Engineering Contradiction:
Core Design Contradiction:
Stability of the object's compositionVSLoss of energy

Solution Approach 1:

The patent substitutes conventional software copy operations with hardware-accelerated atomic instructions (copyxor, copyswap) that perform memory page copying and delta calculation directly in hardware. This substitution maintains VM state consistency through atomic operations while dramatically reducing IO bandwidth usage by eliminating the need for software-mediated data transfer and processing.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Data Source

PatentUS11200054B2Atomic-copy-XOR instruction for replacing data in a first cacheline with data from a second cacheline
Publication Date: 2021.12.14
  • US11200054B2 patent drawing
  • US11200054B2 patent drawing
  • US11200054B2 patent drawing

AI summary

Apparatus and associated methods for implementing atomic instructions for copy-XOR of data. An atomic-copy-xor instruction is defined having a first operand comprising an address of a first cacheline and a second operand comprising an address of a second cacheline. The atomic-copy-xor instruction, which may be included in an instruction set architecture (ISA) of a processor, performs a bitwise XOR operation on copies of data retrieved from the first cacheline and second cacheline to generate an XOR result, and replaces the data in the first cacheline with a copy of data from the second cacheline when the XOR result is non-zero. In addition to implementation using a processor core, the atomic-copy-xor instruction may be implemented using various offloading schemes under which the processor core executing the atomic-copy-xor instruction offloads operations to other components in the processor or system in which the processor is implemented, including offloading operations to a last level cache (LLC) engine, a memory controller, or a DIMM controller.