Skip to content

Index

A complete listing of all documentation, organized by topic.


General

Page Description
Home Introduction and overview
Linux Evolution From hobby project to world infrastructure

Memory Management (mm/)

Getting Started

Page Description
Getting Started Prerequisites, setup, and reading order
Overview The 30-year story of Linux memory management

Fundamentals

Page Description
Page Allocator Buddy system - physical page management
kmalloc (SLUB) kmalloc/kfree, size classes, kvmalloc
vmalloc Virtually contiguous allocation
NUMA Multi-node memory management

Address Translation & Process Memory

Page Description
Page Tables Virtual-to-physical address translation
Process Address Space VMAs, mmap, demand paging, COW

Caching & Reclaim

Page Description
Page Cache File data caching and writeback
Page Reclaim LRU, kswapd, MGLRU, OOM killer
Swap Extending memory to disk (zswap, zram)

Advanced Topics

Page Description
Memory Cgroups Container memory limits (v1/v2)
Transparent Huge Pages Automatic 2MB/1GB pages
Compaction Memory defragmentation
KSM Page deduplication for VMs
vrealloc Resizing vmalloc allocations

Lifecycle

Page Description
Life of a malloc Tracing malloc() from userspace to physical pages
Life of a page A physical page's journey through allocation, use, and reclaim
What happens when you fork COW setup, page table copying, and COW fault handling
Running out of memory Watermarks, kswapd, direct reclaim, and OOM killer
Life of a file read How read() flows through the page cache
What happens during swapping Swap-out and swap-in mechanics in detail

Explainers

Page Description
Virtual vs Physical vs Resident Understanding VSZ, RSS, PSS, and USS
Memory Overcommit Why it's the only sane default
brk vs mmap Two ways to get memory from the kernel
Contiguous Memory Why large allocations fail despite free memory
Copy-on-Write COW edge cases and when it breaks

Bugs

Page Description
Bug Index Catalog of notable mm bugs, CVEs, and edge cases
SLUB Bugs Heap exploitation (CVE-2021-22555, CVE-2022-29582)
THP Bugs CVE-2020-29368, khugepaged races, collapse bugs
Page Table Bugs Meltdown, Spectre, TLB flush races

Reference

Page Description
Glossary Terminology reference

Planned Subsystems

Subsystem Status
scheduler/ Planned
networking/ Planned
bpf/ Planned
drivers/ Planned

External Resources

Resource Description
Official Kernel Docs Authoritative kernel documentation
LKML Archive Linux kernel mailing list archive
Kernel Source Official git repositories