On 02/05/2013 04:34 AM, Peter Krempa wrote: > > The data in the "nodeinfo" structure (retrirevable by "virsh nodeinfo") > have to add up to the total number of processors in the host if you > multiply all the fields. This is due to historic reasons. Hmm - we document under virNodeInfo the cases where the return value will not be ideal, as well as how to detect that issue: struct _virNodeInfo { char model[32]; /* string indicating the CPU model */ unsigned long memory; /* memory size in kilobytes */ unsigned int cpus; /* the number of active CPUs */ unsigned int mhz; /* expected CPU frequency */ unsigned int nodes; /* the number of NUMA cell, 1 for unusual NUMA topologies or uniform memory access; check capabilities XML for the actual NUMA topology */ unsigned int sockets; /* number of CPU sockets per node if nodes > 1, 1 in case of unusual NUMA topology */ unsigned int cores; /* number of cores per socket, total number of processors in case of unusual NUMA topology*/ unsigned int threads; /* number of threads per core, 1 in case of unusual numa topology */ }; but the documentation for virNodeGetInfo could probably use a reminder sentence (so that the problem is obvious just from the function documentation, without having to chase through links to the struct documentation). > >> >> Anyone else thoughts? Would this be acceptable? Right now the output >> is broken and if you put any NUMA values into the XML or use numad the >> domain will not start and will give a cryptic error message. Which is >> a lot worst than reporting 4 sockets, 8 cores, 1 thread or 8 sockets, >> 8 cores and 1 thread IMHO. > > To get correct data, you have to use libvirt-1.0.2 with this script: > > https://bugzilla.redhat.com/attachment.cgi?id=690965&action=edit We should probably ship this script in the examples directory of libvirt.git, and reference it more prominently from the documentation. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list