Re: oom-killer not invoked on systems with multiple memory-tiers
From: Akinobu Mita
Date: Tue Oct 28 2025 - 03:28:12 EST
lru_gen_age_node() checks the reclaimability of a node using
lruvec_is_reclaimable() when min_ttl_ms is non-zero, but if min_ttl_ms
is zero, it unconditionally determines that the node is reclaimable.
I think we should still call lruvec_is_reclaimable() to check
reclaimability even if min_ttl_ms is zero.
Otherwise, we'll miss the opportunity to trigger an OOM kill in
lru_gen_age_node(), which will cause the problem I reported.
https://lore.kernel.org/linux-mm/20251022135735.246203-1-akinobu.mita@xxxxxxxxx/
The attached patch made the changes mentioned above and worked around
the problem.
---
mm/vmscan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/vmscan.c b/mm/vmscan.c
index c922bad2b8fd..e1a88ed4e0b0 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -4148,7 +4148,7 @@ static void lru_gen_age_node(struct pglist_data *pgdat, struct scan_control *sc)
{
struct mem_cgroup *memcg;
unsigned long min_ttl = READ_ONCE(lru_gen_min_ttl);
- bool reclaimable = !min_ttl;
+ bool reclaimable = false;
VM_WARN_ON_ONCE(!current_is_kswapd());
--
2.43.0