Re: [RFC][PATCH 2/6] x86/topo: Add TOPO_NUMA_DOMAIN
From: Peter Zijlstra
Date: Mon Mar 02 2026 - 11:36:18 EST
On Mon, Mar 02, 2026 at 09:05:03PM +0530, K Prateek Nayak wrote:
> > I had a quick look at this NPS stuff, and that is more or less the same
> > as the intel SNC thing. With two notable exceptions:
> >
> > - you've stuck to power-of-two numbers (good!)
>
> Yeah but "L3 as NUMA" on a 6CCX machines doesn't follow that :-(
> Is there any implicit dependency there?
>
> P.S. All these configs are symmetric so those divisions should give the
> correct results.
Nah, the code here doesn't care. Specifically the case at hand was
SNC-3, where we make one package have 3 nodes.
> > - NPS0; I don't think Intel has anything like that (although I could be
> > mistaken).
> >
> > Now, the __num_nodes_per_package is obviously not going to work for
> > NPS0 (it bottoms out at 1).
> >
> > Should we look at adding something for NPS0, or has that not been needed
> > (yet) ?
>
> Let me go boot into NPS0 to see what my machine thinks. But it shouldn't
> do any harm right because of the DIV_ROUND_UP() right?
Right, no harm. And I've since realized you can detect it by:
num_phys_nodes() == 1 && topology_max_packages() == 2