Virtual Memory Segmentation for TLB Flush Reduction

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional virtualized computing environments face performance issues such as low throughput and high latency due to the need for frequent Translation Lookaside Buffer (TLB) flushes during virtualized I/O operations, which are costly in terms of latency and overhead.

Innovation Solution

The approach involves allocating specific virtual memory locations for each CPU to perform I/O operations, restricting access to those locations to prevent unnecessary TLB flushes across all CPUs, by pre-allocating page table slots and using a special memory map mechanism to ensure only the designated CPU performs I/O operations, thereby minimizing TLB flushes.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If virtualized I/O operations use shared memory across all CPUs, then memory accessibility is improved, but TLB flush frequency increases causing higher latency

Engineering Contradiction:
Improvememory accessibilityVSAvoidTLB flush latency
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

The patent segments the shared memory space into CPU-specific virtual memory regions, where each CPU has its own dedicated virtual memory space for I/O operations. This segmentation allows each CPU to access its assigned memory region without triggering TLB flushes on other CPUs, thus maintaining memory accessibility while reducing TLB flush frequency and associated latency.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent implements local quality by making memory access rights CPU-specific. Each CPU is granted access to specific virtual memory regions that are locally optimized for its I/O operations. This local quality approach ensures that memory accessibility is maintained for each CPU while preventing unnecessary global TLB flushes that would affect all CPUs.

Inventive Principle:
Principle #3Local quality

2Loss of information

If memory mapping is performed for all CPUs during I/O operations, then memory visibility is improved, but system overhead increases

Engineering Contradiction:
Improvememory visibilityVSAvoidsystem overhead
Core Design Contradiction:
Loss of informationVSDevice complexity

Solution Approach 1:

The patent extracts the memory mapping operation from a global all-CPU scope and limits it to only the specific CPU that needs to perform the I/O operation. By taking out the unnecessary memory mapping operations for other CPUs, the patent maintains sufficient memory visibility for I/O operations while significantly reducing the system overhead associated with mapping and unmapping memory across all CPUs.

Inventive Principle:
Principle #2Taking out (Extraction)

3Adaptability or versatility

If virtualized I/O uses global memory access, then I/O flexibility is improved, but throughput decreases due to frequent TLB flushes

Engineering Contradiction:
ImproveI/O flexibilityVSAvoidI/O throughput
Core Design Contradiction:
Adaptability or versatilityVSProductivity

Solution Approach 1:

The patent segments the virtualized I/O memory access into CPU-specific regions, allowing each CPU to perform I/O operations on its assigned virtual memory space without triggering global TLB flushes. This segmentation maintains I/O flexibility by allowing virtualized access while improving throughput by eliminating the performance penalty of frequent global TLB flushes.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS8924684B1Virtual memory management to reduce address cache flushing during I/O operations
Publication Date: 2014.12.30 AMAZON TECH INC
  • US8924684B1 patent drawing
  • US8924684B1 patent drawing
  • US8924684B1 patent drawing

AI summary

Approaches are described for reducing the number of memory address cache (e.g. TLB) flushes that need to be performed during the course of performing virtualized I/O. A device driver residing in a host domain registers a CPU that will be used for I/O processing and requests the hypervisor to pre-allocate a number of slots in the page tables to map memory pages during I/O operations. Upon receiving an I/O operation, when memory needs to be mapped, the driver provides the hypervisor with information about the registered CPU. The hypervisor uses the pre-allocated page table slots to create the new mapping and flushes the TLB cache corresponding to the CPU that will perform the I/O. The TLB cache belonging to other CPUs may not need to be flushed. The host driver ensures that the mapped memory page is used exclusively on the CPU or performs additional TLB flushes.