Memory Allocation Granularity for Lower Page Metadata Overhead

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing memory management methods result in significant overheads due to the creation of page frame metadata based on a fixed granularity, leading to waste and inefficiency in allocating physical pages of varying sizes, especially in scenarios involving both small and large pages.

Innovation Solution

Create page frame metadata based on a huge page granularity and dynamically adjust the physical page allocation based on the required memory size of a process, allowing for allocation at different granularities to reduce metadata management overheads and improve efficiency.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Manufacturing precision

If page frame metadata is created based on minimum granularity (4 KB), then memory management can be performed with fine granularity, but management overhead increases in direct proportion to total physical memory size

Engineering Contradiction:
Improvememory management granularityVSAvoidpage frame metadata overhead
Core Design Contradiction:
Manufacturing precisionVSQuantity of substance

Solution Approach 1:

The patent segments physical memory into different granularity levels (huge pages and basic pages). Page frame metadata is created only for huge pages at the coarse level, while basic pages within each huge page are managed as a group without individual metadata. This segmentation resolves the contradiction by eliminating the need for metadata for every 4 KB page while still enabling fine-grained management when needed.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces a hierarchical dimension to memory management, organizing memory into multiple levels (huge page level and basic page level). At the huge page level, metadata is created for coarse-grained management; at the basic page level, individual pages can be managed without separate metadata structures. This dimensional approach allows the system to achieve fine granularity control without proportionally increasing metadata overhead.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

2Quantity of substance

If huge pages are used to reduce metadata overhead, then management overhead decreases, but allocation flexibility for processes requiring smaller granularities is reduced

Engineering Contradiction:
Improvepage frame metadata overheadVSAvoidallocation flexibility
Core Design Contradiction:
Quantity of substanceVSAdaptability or versatility

Solution Approach 1:

The patent implements dynamic allocation by allowing the system to choose between allocating entire huge pages or subdividing them into basic pages based on process requirements. When a process needs memory, the system can allocate a huge page and then dynamically divide it into smaller basic pages if the process requires fine-grained allocation. This dynamic approach maintains low metadata overhead while preserving allocation flexibility.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent merges the management of multiple basic pages under a single huge page metadata structure. Instead of creating separate metadata for each basic page, the system combines them into a hierarchical structure where one huge page metadata entry manages multiple basic pages. This merging reduces the total quantity of metadata while maintaining the ability to allocate individual basic pages when needed.

Inventive Principle:
Principle #5Merging (Combining)

3Manufacturing precision

If page frame metadata is created for every basic page, then allocation precision is high, but memory waste occurs when allocating larger chunks to processes

Engineering Contradiction:
Improveallocation precisionVSAvoidmemory waste
Core Design Contradiction:
Manufacturing precisionVSLoss of substance

Solution Approach 1:

The patent enables dynamic allocation precision by allowing the system to allocate memory at the appropriate granularity level based on process needs. When a process requires a large contiguous block, the system can allocate entire huge pages without subdividing, achieving coarse-grained allocation with minimal waste. When fine-grained allocation is needed, the system can subdivide huge pages into basic pages. This dynamic approach eliminates the need to always use fine granularity, thereby reducing memory waste.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent changes the allocation parameter (granularity level) based on process requirements. Instead of fixed 4 KB basic page allocation, the system can adjust the allocation unit to huge pages (e.g., 2 MB) when processes require large memory blocks. This parameter change allows the system to match allocation size to actual needs, reducing the memory waste that occurs when small pages are allocated in large quantities.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS20260072602A1Memory management method and computer device
Publication Date: 2026.03.12 HUAWEI TECH CO LTD
  • US20260072602A1 patent drawing
  • US20260072602A1 patent drawing
  • US20260072602A1 patent drawing

AI summary

This disclosure provides a memory management method, including: dividing a physical memory into N first physical pages based on a first granularity, and creating N pieces of first page frame metadata corresponding to the N first physical pages, where the first granularity is greater than a minimum granularity supported by a computer device; determining, based on a request of a first process, a size of a physical memory required by the first process; and choosing, based on the size of the physical memory required by the first process, to allocate O first physical pages to the first process at the first granularity, or choosing to allocate Q second physical pages to the first process at a second granularity, or choosing to allocate W first physical pages to the first process at the first granularity and allocate T second physical pages to the first process at the second granularity.