On Tue, Dec 30, 2025 at 09:15:34PM +0100, David Hildenbrand (Red Hat) wrote: > On 12/30/25 15:06, Gregory Price wrote: > > And given we don't have a boot memory device, the idea was to set it for the > Node, where it means "all boot memory is SPM". And we only allow one type of > boot memory (one memory backend) per node in QEMU. > > The tricky question is what happens with memory hotplug (DIMMs etc) on such > a node. I'd argue that it's simply not SPM. >
... +++ .../docs/whatever + Don't do that. :] > > > > --- > > > > bit of an aside - but at LPC we also talked about SPM NUMA nodes: > > https://lore.kernel.org/linux-mm/[email protected]/ > > > > Would be cool to be able to detect this in the drivers and have hotplug > > automatically mark a node SPM unless a driver overrides it. > > (MHP flag? Sorry David :P) > > :) > > If it's a per-node thing, MHP flags feel a bit like "too late". It should be > configured earlier for the node somehow. > just a clarification, the flag would be an override to have mhp mark a node N_MEMORY instead of N_SPM. As it stands right now, a node is "online with memory" if N_MEMORY is set for that node. https://elixir.bootlin.com/linux/v6.14-rc6/source/mm/memory_hotplug.c#L717 I imagine hotplugged N_SPM would operate the same. So mhp code would look like if (node_data->is_spm && !override) node_set_state(node, N_SPM) else node_set_state(node, N_MEMORY) Basically would allow SPM nodes to operate the same as they did before when hotplugged to retain existing behavior. (Sorry i'm think waaaaaaaaaaaaay far ahead here) ~Gregory
