Kernel Memory Relocation via Physical Address Hardware Mapping Entries
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In computer systems, particularly those with 32-bit architectures like x86, partitioning the virtual address space to identify relocatable data in nonrelocatable kernel memory is inefficient and imposes artificial restrictions, making it difficult to free up memory by moving relocatable data to the relocatable kernel memory partition.
Innovation Solution
A method is introduced to identify and relocate relocatable kernel memory allocations in non-relocatable kernel memory by using physical address hardware mapping entries (PA HMEs) with null pre-relocation and post-relocation handler references, and traversing a pmap list to determine the relocatability of pages, allowing for efficient management and relocation of memory.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Difficulty of detecting and measuring
If the kernel virtual address space is partitioned into relocatable and nonrelocatable regions to identify relocatable data, then relocatable data can be identified, but this approach is inefficient and imposes artificial restrictions on the virtual address space
Solution Approach 1:
The patent extracts the identification mechanism from the virtual address space partitioning approach. Instead of using virtual address regions to identify relocatable data, the invention uses physical address hardware mapping entries (PA HMEs) with specific handler reference patterns. This separates the identification function from the address space structure, eliminating artificial restrictions while maintaining identification capability.
Solution Approach 2:
The patent introduces PA HMEs as an intermediary structure between physical memory and the relocation management system. These HMEs contain pre-relocation and post-relocation handler references that serve as mediators to identify relocatable pages without requiring virtual address space partitioning. The intermediary structure enables efficient identification while avoiding the complexity of partitioned address spaces.
2Quantity of substance
If relocatable data is stored in non-relocatable kernel memory partition, then more space is available in relocatable partition, but relocatable data must be moved back to relocatable partition when needed
Solution Approach 1:
The patent applies preliminary action by establishing handler references in PA HMEs during memory allocation, before any relocation needs arise. The pre-relocation handler is registered in advance, enabling rapid identification and relocation when needed. This preliminary setup eliminates the need for complex runtime analysis and reduces relocation time when memory pressure occurs.
Solution Approach 2:
The patent changes the identification parameter from virtual address region to PA HME handler reference status. By using null handler references as the identifying parameter, the system can efficiently detect relocatable pages in the nonrelocatable partition without requiring physical movement or complex address space reorganization, thereby reducing relocation overhead.
3Reliability
If device drivers allocate non-relocatable kernel memory for DMA transfers, then DMA operations can access memory by physical address, but relocatable data cannot be moved during DMA transfers
Solution Approach 1:
The patent introduces dynamics by making the relocation status of memory pages flexible rather than fixed. Pages allocated in the nonrelocatable partition can be dynamically identified as relocatable through their PA HME handler references and moved when needed. This dynamic capability allows the system to adapt between DMA reliability requirements and memory relocation flexibility based on actual system conditions.
Solution Approach 2:
The patent applies local quality by allowing different relocation characteristics within the same memory partition. Individual pages in the nonrelocatable kernel memory partition can have different relocation properties based on their PA HME handler references. This enables fine-grained control where specific pages can be relocatable while others remain fixed, accommodating both DMA requirements and memory management flexibility.
Data Source
AI summary
A method for identifying relocatable kernel memory allocations in kernel non-relocatable memory is described. In this method, a physical address hardware mapping entry (PA HME) for each process accessing a physical page of memory by physical addresses. For each of the PA HMEs corresponding a process that does not permit page relocation, the pre-relocation handler and post-relocation handler references of each PA HME is set to null. Each PA HMEs is associated with a pmapping list for the physical page. Thus, A physical page is identified as non-relocatable when one of the PA HMEs referenced by the pmapping list has null pre-relocation and post-relocation handler references.


