Skip to content

Commit

Permalink
Merge pull request apache#1520 from NuxRo/kvm-numa-cpu-reporting
Browse files Browse the repository at this point in the history
CPU socket count reporting correctionCPU socket count reporting correction
From MissionCriticalCloudOldRepos/cosmic-plugin-hypervisor-kvm#16

* pr/1520:
  Remove empty spaces causing the build to fail
  CPU socket count reporting correction

Signed-off-by: Will Stevens <[email protected]>
  • Loading branch information
swill committed May 13, 2016
2 parents c82d502 + 108b351 commit 7be8585
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2622,7 +2622,14 @@ protected List<Object> getHostInfo() {
final NodeInfo hosts = conn.nodeInfo();
speed = getCpuSpeed(hosts);

/*
* Some CPUs report a single socket and multiple NUMA cells.
* We need to multiply them to get the correct socket count.
*/
cpuSockets = hosts.sockets;
if (hosts.nodes > 0) {
cpuSockets = hosts.sockets * hosts.nodes;
}
cpus = hosts.cpus;
ram = hosts.memory * 1024L;
final LibvirtCapXMLParser parser = new LibvirtCapXMLParser();
Expand Down

0 comments on commit 7be8585

Please sign in to comment.