Kernel Page Grouping for Physical Memory De-fragmentation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Fragmentation in physical memory, where kernel and user pages become intermixed, leading to performance issues due to the difficulty in relocating kernel pages, which is resource-intensive and can impede system performance, especially in systems that require high availability for mission-critical applications.

Innovation Solution

Creating a kernel page-freelist in addition to user page-freelists, where user pages are designated as kernel pages and added to the kernel page-freelist, allowing for the grouping of kernel pages within large pages, reducing the need for kernel page relocation during coalescing.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If kernel pages are relocated during coalescing to free up space, then large pages can be coalesced, but system performance deteriorates due to the resource-intensive nature of kernel page relocation

Engineering Contradiction:
Improvelarge page coalescing capabilityVSAvoidsystem performance
Core Design Contradiction:
ProductivityVSLoss of energy

Solution Approach 1:

The patent applies preliminary action by designating user pages as kernel pages and adding them to the kernel page-freelist before coalescing operations are needed. This pre-positioning of pages eliminates the need for resource-intensive kernel page relocation during coalescing, as the required pages are already in place and marked as available.

Inventive Principle:
Principle #10Preliminary action

2Stability of the object's composition

If kernel pages are grouped together in physical memory, then fragmentation is reduced, but the system cannot adapt to dynamic memory allocation needs

Engineering Contradiction:
Improvememory fragmentationVSAvoiddynamic memory allocation
Core Design Contradiction:
Stability of the object's compositionVSAdaptability or versatility

Solution Approach 1:

The patent applies dynamics by maintaining a kernel page-freelist that dynamically tracks and manages kernel pages. The system can adaptively allocate and deallocate kernel pages from this freelist based on runtime memory needs, while still maintaining the grouping benefit. The freelist structure allows the system to respond to dynamic allocation requests without scattering kernel pages throughout memory.

Inventive Principle:
Principle #15Dynamics

3Productivity

If a separate kernel page-freelist is created to manage kernel pages, then page management efficiency improves, but system complexity increases

Engineering Contradiction:
Improvepage management efficiencyVSAvoidmemory management structure
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent applies universality by designing the kernel page-freelist to serve multiple functions: it tracks available kernel pages for allocation, maintains the grouping of kernel pages to reduce fragmentation, and provides a mechanism for efficient coalescing operations. This multi-functional design consolidates what could be multiple separate management structures into a single unified system.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentUS7802070B2Approach for de-fragmenting physical memory by grouping kernel pages together based on large pages
Publication Date: 2010.09.21 ORACLE AMERICAN INC
  • US7802070B2 patent drawing
  • US7802070B2 patent drawing
  • US7802070B2 patent drawing

AI summary

An approach for de-fragmenting physical memory generally involves grouping kernel pages together based on large pages. The de-fragmentation procedure is triggered, such as by a kernel page-freelist being empty. The first user page from a user page-freelist is selected, marked as a kernel page (e.g., by setting a P_KERNEL bit), added to the kernel page-freelist, and then the large page in which the selected page is identified. Starting with the first small page within the large page, the small pages are processed by the de-fragmentation procedure, resulting in as many small pages as possible being marked as kernel pages and then added to the kernel page-freelist. Later, when a large page is coalesced, the number of kernel pages that must be relocated within the large page being coalesced is reduced or eliminated as a result of the de-fragmentation of the physical memory.