Linux Kernel Journey
Sep 14, 2024 · Fundamentals
Understanding Linux Page Reclaim: LRU, Second‑Chance, and Direct Reclaim Walkthrough
This article explains Linux's page reclamation mechanisms, covering the LRU list algorithm, the second‑chance method with PG_active and PG_referenced flags, and the direct reclaim path triggered by alloc_page, including the role of kswapd, waiting queues, and key kernel functions such as lru_cache_add, mark_page_accessed, try_to_free_pages, and throttle_direct_reclaim.
LRULinuxdirect reclaim
0 likes · 12 min read
