Re: [RFC][PATCH 2/6] x86/topo: Add TOPO_NUMA_DOMAIN

From: K Prateek Nayak

Date: Sun Mar 01 2026 - 23:17:18 EST


Hello Peter,

On 2/27/2026 7:36 PM, Peter Zijlstra wrote:
>> Looking at the series, all we need is an equivalent of:
>>
>> domain_weight(TOPO_NUMA_DOMAIN)
>
> Fair enough; but then lets replace patch 1 and 2 with something like
> that.
>
> But I must note that the nodemask API is crap; it has both node_set() and
> __node_set() be the atomic version :-(
>
> Let me go rework the other patches to fit on this.

Boots fine with a s/domain_weight(TOPO_NUMA_DOMAIN)/num_phys_nodes()/
applied to Patch 3.

Topology looks fine for NPS4 on my 3rd Generation EPYC with 2 sockets,
and I haven't triggered any warning even with "L3 as NUMA" turned on.
Feel free to include:

Tested-by: K Prateek Nayak <kprateek.nayak@xxxxxxx>

--
Thanks and Regards,
Prateek