From: Akinobu Mita <akinobu.mita@gmail.com>
To: akinobu.mita@gmail.com
Cc: linux-cxl@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, akpm@linux-foundation.org,
axelrasmussen@google.com, yuanchu@google.com, weixugc@google.com,
hannes@cmpxchg.org, david@redhat.com, mhocko@kernel.org,
zhengqi.arch@bytedance.com, shakeel.butt@linux.dev,
lorenzo.stoakes@oracle.com
Subject: Re: oom-killer not invoked on systems with multiple memory-tiers
Date: Tue, 28 Oct 2025 16:27:36 +0900 [thread overview]
Message-ID: <20251028072736.10455-1-akinobu.mita@gmail.com> (raw)
In-Reply-To: <20251022135735.246203-1-akinobu.mita@gmail.com>
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@gmail.com/
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
next prev parent reply other threads:[~2025-10-28 7:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-22 13:57 Akinobu Mita
2025-10-28 7:27 ` Akinobu Mita [this message]
2025-10-28 19:54 ` Shakeel Butt
2025-10-30 0:51 ` Akinobu Mita
2025-11-14 8:43 ` Akinobu Mita
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251028072736.10455-1-akinobu.mita@gmail.com \
--to=akinobu.mita@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=axelrasmussen@google.com \
--cc=david@redhat.com \
--cc=hannes@cmpxchg.org \
--cc=linux-cxl@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=mhocko@kernel.org \
--cc=shakeel.butt@linux.dev \
--cc=weixugc@google.com \
--cc=yuanchu@google.com \
--cc=zhengqi.arch@bytedance.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox