Tagged articles
4 articles
Page 1 of 1
OPPO Kernel Craftsman
OPPO Kernel Craftsman
Aug 9, 2024 · Fundamentals

Linux Kernel Memory Management Locks and Optimization Case Studies

The article examines Linux kernel 6.9 memory-management locks—PG_locked, lru_lock, mmap_lock, anon_vma rwsem, mapping i_mmap_rwsem, and shrinker_rwsem—explaining their roles and presenting eight community-driven optimizations such as per-memcg lru_lock, per-VMA locks, speculative faults, and lock-less shrinker techniques to improve concurrency and performance.

LRU LockLinux kernelMemory Management
0 likes · 24 min read
Linux Kernel Memory Management Locks and Optimization Case Studies
Liangxu Linux
Liangxu Linux
Apr 6, 2023 · Operations

How Linux Compacts Memory to Eliminate Fragmentation

This article explains the problem of memory fragmentation in Linux, describes the compaction algorithm that moves free pages together, and walks through the key kernel functions—alloc_pages_node, __alloc_pages_direct_compact, try_to_compact_pages, isolate_migratepages, migrate_pages, and unmap_and_move—detailing their roles in gathering movable pages and relocating them to create contiguous memory blocks.

LinuxMemory Fragmentationalloc_pages
0 likes · 10 min read
How Linux Compacts Memory to Eliminate Fragmentation