Re: [PATCH v2 1/2] mm/vmalloc: fix numa spreading for large hash tables

From: Chen Wandun
Date: Mon Oct 18 2021 - 09:01:09 EST




在 2021/10/18 20:39, Matthew Wilcox 写道:
On Mon, Oct 18, 2021 at 08:37:09PM +0800, Chen Wandun wrote:
Eric Dumazet reported a strange numa spreading info in [1], and found
commit 121e6f3258fe ("mm/vmalloc: hugepage vmalloc mappings") introduced
this issue [2].

I think the root problem here is that we have two meanings for
NUMA_NO_NODE. I tend to read it as "The memory can be allocated from
any node", but here it's used to mean "The memory should be spread over
every node". Should we split those out as -1 and -2?
Yes, the intent of NUMA_NO_NODE some time is confused.

Besides,I think NUMA_NO_NODE should consider mempolicy in
most cases in the kernel unless it point out explicitly memory
can be allocated without considering mempolicy.

.