Tag

munlock

0 views collected around this technical thread.

OPPO Kernel Craftsman
OPPO Kernel Craftsman
Mar 4, 2022 · Operations

Understanding Linux mlock and munlock: Memory Locking and Reclamation Mechanisms on arm64

On arm64 Linux kernels (e.g., 5.10.27), the mlock system call marks VMAs with VM_LOCKED, forces page faults, sets the PG_mlocked flag and moves pages into the unevictable LRU so they cannot be reclaimed, while munlock clears these flags and returns pages to regular LRU lists, guaranteeing resident memory for latency‑sensitive applications.

ARM64KernelLRU
0 likes · 7 min read
Understanding Linux mlock and munlock: Memory Locking and Reclamation Mechanisms on arm64