Re: [RFC PATCH v3 06/13] powerpc/setup: Initialize sbm topology based on coregroup / NUMA topology
From: K Prateek Nayak
Date: Sun Oct 11 2026 - 22:30:09 EST
Hello Shrikanth,
On 10/7/2026 8:13 PM, Shrikanth Hegde wrote:
> Hi Prateek.
>
> On 10/2/26 12:58 AM, K Prateek Nayak wrote:
>> Initialize sparsebitmap (sbm) topology based on the coregroup
>> information. Each coregorup gets its own sparsemask leaf.
>>
>> pSeries and memory hotplug are interesting since a hotplug can place a
>> newly added CPU on any online node. This requires special care to allow
>> estimating bitmask size considering the worst case scenarios - each CPU
>> onlined is on a separate node, and this is a new N_CPU node.
>>
>> Platform may enforce a stricter standards for the CPUs being online and
>> what nodes they can be mapped to but the current implementations makes
>> no assumptions and considers each CPU can be onlined on a unique node.
>>
>
> I think this suffers the same fate as structures which are allocated at boot
> time such as runqueues.
>
> So your fallback option of putting all the disabled into singleton node may be
> sensible option. (If you are not doing that already)
For pSeries I allocate a humongous chunk of memory on sbm_alloc() and
control how much of that memory needs traversing based on the set of
online CPUs. Not ideal but yes, I will probably pivot to doing
something like what per-cpu setup does by using ealy topology +
assuming a few things about the rest.
> But yhea, will see more into it, this changing node stuff is new for me too.
> Also i need to read your patch series too :)
Thank you again for taking a look at the series and early testing.
_Me goes digs down on couple regressions I've noticed_
--
Thanks and Regards,
Prateek