Tag

Page Migration

0 views collected around this technical thread.

OPPO Kernel Craftsman
OPPO Kernel Craftsman
Nov 10, 2023 · Operations

Memory Compaction in the Linux Kernel: Mechanisms, Strategies, and Implementation Details

Linux’s memory compaction mitigates external fragmentation by moving movable pages, employing four strategies—direct, passive (kcompactd), proactive, and active—each invoking the compact_zone core with configurable compact_control parameters, migrate‑page and free‑page scanners, and distinct trigger and exit conditions.

Linux kernelMemory CompactionPage Migration
0 likes · 45 min read
Memory Compaction in the Linux Kernel: Mechanisms, Strategies, and Implementation Details
OPPO Kernel Craftsman
OPPO Kernel Craftsman
Mar 10, 2023 · Fundamentals

CMA (Contiguous Memory Allocator) Technical Principle Analysis and Source Code Interpretation

Linux’s Contiguous Memory Allocator (CMA) reserves and manages large physical memory blocks for devices by integrating with the Buddy system, using structures like struct cma, bitmap allocation, and APIs such as cma_init_reserved_mem and cma_alloc, while handling page migration, LRU and per‑CPU PCP caches to ensure efficient allocation and release.

Buddy SystemCMAContiguous Memory
0 likes · 15 min read
CMA (Contiguous Memory Allocator) Technical Principle Analysis and Source Code Interpretation