[libvirt] [RFC] NUMA topology specification

Adam Litke agl at us.ibm.com
Fri Aug 19 13:40:19 UTC 2011



On 08/19/2011 01:35 AM, Bharata B Rao wrote:
> May be something like this: (OPTION 2)
> 
> <cpu>
> ...
> <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'>
> ...
> </cpu
> 
> This should result in a 2 node system with each node having 1 socket
> with 2 cores.
> 
> Comments, suggestions ?

Option 2 (above) seems like the most logical interface to me.  I would
not support putting this under <numatune> because of the high risk of
users confusing guest NUMA topology definition with host NUMA tuning.

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.

-- 
Adam Litke
IBM Linux Technology Center




More information about the libvir-list mailing list