From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org,ziy@nvidia.com,ying.huang@linux.alibaba.com,
weixugc@google.com,rakie.kim@sk.com,joshua.hahnjy@gmail.com,david@kernel.org,
aneesh.kumar@linux.ibm.com,gourry@gourry.net,akpm@linux-foundation.org
Subject: [merged mm/core.git: for-next] mm-memory-tiers-reset-demotion-targets-of-nodes-without-memory.patch removed from -mm tree
Date: Tue, 24 Nov 2026 12:00:52 -0800 [thread overview]
Message-ID: <20261124200052.B14E71F000C6@smtp.kernel.org> (raw)
In-Reply-To: <20261021024438.1942502-1-gourry@gourry.net>
The quilt patch titled
Subject: mm/memory-tiers: reset demotion targets of nodes without memory
has been removed from the -mm tree. Its filename was
mm-memory-tiers-reset-demotion-targets-of-nodes-without-memory.patch
This patch was dropped because it was merged into mm/core.git: for-next
------------------------------------------------------
From: "Gregory Price (Meta)" <gourry@gourry.net>
Subject: mm/memory-tiers: reset demotion targets of nodes without memory
Date: Tue, 20 Oct 2026 22:44:38 -0400
When a node loses its last memory, offline_pages() clears N_MEMORY before
the memory-tier callback rebuilds the demotion targets.
disable_all_demotion_targets() resets only N_MEMORY nodes, so the node
keeps its old node_demotion[] entry while it has no memory. Before
6c542ab75714, the reset covered every online node.
A reclaimer reads the stale entry only between the node regaining memory
and its targets being rebuilt, and it filters the entry against the
current allowed targets, so there is no user-visible effect. To see it,
online and then offline a node's only DIMM: a debugger still finds the
lower-tier node in node_demotion[nid].preferred.
Reset the targets of every node.
Link: https://patch.msgid.link/20261021024438.1942502-1-gourry@gourry.net
Fixes: 6c542ab75714 ("mm/demotion: build demotion targets based on explicit memory tiers")
Signed-off-by: Gregory Price (Meta) <gourry@gourry.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Zi Yan <ziy@nvidia.com>
Cc: David Hildenbrand <david@kernel.org>
Cc: Joshua Hahn <joshua.hahnjy@gmail.com>
Cc: Rakie Kim <rakie.kim@sk.com>
Cc: Ying Huang <ying.huang@linux.alibaba.com>
Cc: Wei Xu <weixugc@google.com>
Cc: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
mm/memory-tiers.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
--- a/mm/memory-tiers.c~mm-memory-tiers-reset-demotion-targets-of-nodes-without-memory
+++ a/mm/memory-tiers.c
@@ -378,7 +378,11 @@ static void disable_all_demotion_targets
struct memory_tier *memtier;
int node;
- for_each_node_state(node, N_MEMORY) {
+ /*
+ * When the NODE_REMOVED_LAST_MEMORY event fires, N_MEMORY has already
+ * been dropped from the node, so we must walk every node instead.
+ */
+ for_each_node(node) {
node_demotion[node].preferred = NODE_MASK_NONE;
/*
* We are holding memory_tier_lock, it is safe
_
Patches currently in -mm which might be from gourry@gourry.net are
mm-mempolicy-convert-mempolicy-refcnt-to-refcount_t.patch
selftests-mm-add-madv_cold-and-madv_pageout-contract-tests.patch
selftests-mm-check-madv_cold-and-madv_pageout-range-handling.patch
selftests-mm-check-that-madv_cold-and-madv_pageout-reject-hugetlb.patch
selftests-mm-check-that-madv_cold-and-madv_pageout-preserve-shared-memory.patch
selftests-mm-check-madv_cold-and-madv_pageout-on-partly-advised-thps.patch
selftests-mm-check-madv_pageout-file-permissions.patch
selftests-mm-check-that-unauthorized-madv_pageout-skips-large-file-folios.patch
mm-hmm-reject-shadow-stack-mappings.patch
prev parent reply other threads:[~2026-11-24 20:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-21 2:44 [PATCH v2] mm/memory-tiers: reset demotion targets of nodes without memory Gregory Price (Meta)
2026-10-21 2:46 ` Zi Yan
2026-11-12 9:37 ` David Hildenbrand
2026-11-24 20:00 ` Andrew Morton [this message]
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=20261124200052.B14E71F000C6@smtp.kernel.org \
--to=akpm@linux-foundation.org \
--cc=aneesh.kumar@linux.ibm.com \
--cc=david@kernel.org \
--cc=gourry@gourry.net \
--cc=joshua.hahnjy@gmail.com \
--cc=mm-commits@vger.kernel.org \
--cc=rakie.kim@sk.com \
--cc=weixugc@google.com \
--cc=ying.huang@linux.alibaba.com \
--cc=ziy@nvidia.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.