Virtualized Cache Implementation via Direct Non-Root Mode Access
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing virtualized cache solutions experience significant delays due to virtualization switching overheads, leading to reduced cache performance in virtualization environments.
Innovation Solution
A virtualized cache implementation method that stores cache metadata with a one-to-one mapping relationship between virtual addresses and physical addresses, allowing direct access to cache data without switching modes, and manages caches based on quality of service parameters for flexible and efficient cache management.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If the virtual machine switches from non-root mode to root mode to access cache, then the virtual machine can access the cache in the physical machine, but the virtualization switching overheads cause long cache access delay
Solution Approach 1:
The patent extracts the cache access operation from the traditional root mode switching path by introducing a non-root mode direct access mechanism. The virtual machine can directly access the cache without switching to root mode, thereby removing the time-consuming mode switching step while preserving cache access capability.
Solution Approach 2:
The patent introduces a mediator mechanism (the non-root mode access path) between the virtual machine and the cache. This mediator allows direct access without requiring the full root mode switching sequence, effectively reducing the overhead while maintaining the necessary access rights.
2Stability of the object's composition
If the virtual machine switches from root mode back to non-root mode after cache access, then the virtual machine returns to its original state, but the switching overheads increase the total access time
Solution Approach 1:
The patent extracts the return trip to non-root mode by allowing the virtual machine to remain in non-root mode throughout the cache access process. The modified cache access mechanism enables the virtual machine to stay in its original state without requiring mode switching back, thereby eliminating the time loss associated with mode transitions while maintaining state stability.
3Adaptability or versatility
If traditional cache management is used in virtualization environment, then each virtual machine has independent cache, but the cache management complexity increases and resource utilization decreases
Solution Approach 1:
The patent implements a universal cache management mechanism that serves multiple virtual machines through a unified approach. The physical machine's cache management system can dynamically allocate and manage cache resources across different virtual machines based on their quality of service requirements, replacing the traditional one-to-one mapping and reducing overall system complexity.
Solution Approach 2:
The patent introduces dynamic cache management capabilities that allow the system to adaptively allocate cache resources based on real-time quality of service parameters. The cache management mechanism can dynamically adjust cache allocation, eviction policies, and access rights according to the needs of different virtual machines, providing flexibility while simplifying management through centralized control.
Data Source
Figure 1
Figure 2
Figure 3~4
AI summary
Embodiments of this application provide a virtualized cache implementation solution. A memory of a virtual machine stores cache metadata. The cache metadata includes a one-to-one mapping relationship between a plurality of virtual addresses and a plurality of first physical addresses. After an operation request that is delivered by the virtual machine and that includes a first virtual address is obtained, if the cache metadata includes a target first physical address corresponding to the first virtual address, a target second physical address corresponding to the target first physical address is searched for based on preconfigured correspondences between a plurality of first physical addresses and a plurality of second physical addresses, and data is read or written from or to a location indicated by the target second physical address. The virtualized cache implementation solution provided in the embodiments of this application has better cache performance than an existing solution.