[libvirt] [RFC] NUMA topology specification

Bharata B Rao bharata.rao at gmail.com
Mon Aug 22 03:47:52 UTC 2011


On Fri, Aug 19, 2011 at 7:10 PM, Adam Litke <agl at us.ibm.com> wrote:
> On 08/19/2011 01:35 AM, Bharata B Rao wrote:
>> ...
>> <topology sockets='1' cores='2' threads='1' nodeid='0' cpus='0-1' mem='size'>
>> <topology sockets='1' cores='2' threads='1' nodeid='1' cpus='2-3' mem='size'>
>> ...
>
> I like the idea of merging this into <topology> to prevent errors with
> specifying incompatible cpu and numa topologies but I think you can go a
> step further (assuming my following assertion is valid).  Since cpus are
> assigned to numa nodes at the core level, and you are providing a
> 'nodeid' attribute, you can infer the 'cpus' attribute using 'cores' and
> 'nodeid' alone.
>
> For your example above:
> <topology sockets='1' cores='2' threads='1' nodeid='0' mem='size'>
> <topology sockets='1' cores='2' threads='1' nodeid='1' mem='size'>
>
> You have 4 cores total, each node is assigned 2.  Assign cores to nodes
> starting with core 0 and node 0.

Sounds good. Unless anyone or any architecture has specific
requirements of enumerating CPUs differently across nodes, 'cpus=' is
redundant as you observe.

Regards,
Bharata.




More information about the libvir-list mailing list