Kernel Memory Relocation via Physical Address Hardware Mapping Entries

Resolve Bottlenecks,
Find Innovative Solutions
Generate 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

VSEngineering 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

Engineering Contradiction:
Improvedifficulty of identifying relocatable dataVSAvoidcomplexity of virtual address space management
Core Design Contradiction:
Difficulty of detecting and measuringVSDevice complexity

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.

Inventive Principle:
Principle #2Taking out (Extraction)

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.

Inventive Principle:
Principle #24Intermediary (Mediator)

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

Engineering Contradiction:
Improvememory space availabilityVSAvoidtime for data relocation
Core Design Contradiction:
Quantity of substanceVSLoss of time

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.

Inventive Principle:
Principle #10Preliminary action

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.

Inventive Principle:
Principle #35Parameter changes

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

Engineering Contradiction:
Improvereliability of DMA transfersVSAvoidflexibility of memory relocation
Core Design Contradiction:
ReliabilityVSAdaptability or versatility

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.

Inventive Principle:
Principle #15Dynamics

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.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS7562204B1Identifying and relocating relocatable kernel memory allocations in kernel non-relocatable memory
Publication Date: 2009.07.14 ORACLE AMERICAN INC
  • US7562204B1 patent drawing
  • US7562204B1 patent drawing
  • US7562204B1 patent drawing

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.