[PATCH 14/60] mm: base hash distribution on common memory nodes

From: Gregory Price via B4 Relay

Date: Fri Nov 20 2026 - 13:12:11 EST


From: "Gregory Price (Meta)" <gourry@xxxxxxxxxx>

hashdist is useful when large kernel hash tables can be allocated across
multiple NUMA nodes. The tables come from ordinary allocations, which
only N_MEMORY_COMMON nodes serve.

Count N_MEMORY_COMMON nodes when applying the single-node optimization.

Signed-off-by: Gregory Price (Meta) <gourry@xxxxxxxxxx>
---
mm/mm_init.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/mm_init.c b/mm/mm_init.c
index 46fe9a274a7a..f21b3dbcc92a 100644
--- a/mm/mm_init.c
+++ b/mm/mm_init.c
@@ -685,7 +685,7 @@ __setup("hashdist=", set_hashdist);

static inline void fixup_hashdist(void)
{
- if (num_node_state(N_MEMORY) == 1)
+ if (num_node_state(N_MEMORY_COMMON) == 1)
hashdist = false;
}
#else

--
2.56.1