[libvirt] [PATCH] nodeinfo: deal with offline cpus in a node

Peter Krempa pkrempa at redhat.com
Wed Jul 18 08:58:13 UTC 2012


On 07/18/12 04:01, Eric Blake wrote:
> Commit 80533ca forgot to think about offline cpus.  When a node
> cpu is offline, then its topology/ subdirectory is not present,
> leading to spurious error messages leaked to the user such as:
>
> libvir:  error : cannot open /home/dummy/libvirt/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/node/node0/cpu7/topology/physical_package_id: No such file or directory
>
> Fix that, as well as test it; the test data is gathered from a
> machine with one NUMA node, hyperthreading, and with 2 of the
> 8 cpus offline.
>
> * src/nodeinfo.c (virNodeParseNode): Don't parse topology of
> offline cpus.
> * tests/nodeinfotest.c (mymain): Run new test.
> * tests/nodeinfodata/linux-nodeinfo-sysfs-test-6*: New data.
> ---
>
> Offline cpus are an annoying corner case :)

Indeed! Who would ever cripple their machine on purpose :)

>

ACK, thanks for finding this.

Peter




More information about the libvir-list mailing list