Re: x86: WARNING: at mm/memblock.c:1339 memblock_set_node - Usage of MAX_NUMNODES is deprecated. Use NUMA_NO_NODE instead

From: Jan Beulich
Date: Wed Jun 05 2024 - 15:46:53 EST


On 05.06.2024 21:07, Paul E. McKenney wrote:
> On Mon, Jun 03, 2024 at 07:19:21PM +0530, Naresh Kamboju wrote:
>> The following kernel warnings are noticed on x86 devices while booting
>> the Linux next-20240603 tag and looks like it is expected to warn users to
>> use NUMA_NO_NODE instead.
>>
>> Usage of MAX_NUMNODES is deprecated. Use NUMA_NO_NODE instead
>>
>> The following config is enabled
>> CONFIG_NUMA=y
>
> I am seeing this as well. Is the following commit premature?
>
> e0eec24e2e19 ("memblock: make memblock_set_node() also warn about use of MAX_NUMNODES")
>
> Maybe old ACPI tables and device trees need to catch up?
>
> Left to myself, I would simply remove the WARN_ON_ONCE() from the above
> commit, but I would guess that there is a better way.

Well, the warning is issued precisely to make clear that call
sites need to change. A patch to do so for the two instances
on x86 that I'm aware of is already pending maintainer approval.

Jan