kswapd
kswapd is a memory management kernel thread in the Linux kernel that handles page reclamation to free memory when the system runs low on free pages. It traditionally runs per NUMA node, with one kswapd instance managing reclaim for that node's memory zones. Its primary role is to keep a healthy pool of free pages by evicting or reclaiming pages from various memory pools, including page cache and anonymous memory.
The reclamation process is triggered when free memory falls below predefined watermarks. When activated, kswapd works
kswapd uses the kernel’s shrinker framework to reclaim memory, iterating over per-zone LRU lists and coordinating
The behavior of kswapd is influenced by memory pressure and tunables such as swappiness, which affects how