1. 23 1月, 2014 1 次提交
  2. 22 1月, 2014 1 次提交
    • B
      linuxNodeGetCPUStats: Correctly handle cpu prefix · 94f82053
      Bing Bu Cao 提交于
      To retrieve node cpu statistics on Linux system, the
      linuxNodeGetCPUstats function simply uses STRPREFIX() to match the cpuid
      with the one read from /proc/stat. However, as the file is read line by
      line it may happen, that some CPUs share the same prefix. So if user
      requested stats for the first CPU, which is offline, then there's no
      cpu1 in the stats file so the one that we match is cpu10. Which is
      obviously wrong. Fortunately, the IDs are terminated by a space, so we
      can utilize that.
      Signed-off-by: NBing Bu Cao <mars@linux.vnet.ibm.com>
      94f82053
  3. 07 1月, 2014 1 次提交
  4. 07 11月, 2013 1 次提交
    • E
      nodeinfo: fix build on non-Linux · adb44955
      Eric Blake 提交于
      Commit b0f85462 broke the build on mingw, by exposing code that
      had Linux-specific dependencies but which was previously protected
      by libnuma ifdef guards:
      
      make[3]: Entering directory `/home/eblake/libvirt-tmp/build/src'
        CC       libvirt_driver_la-nodeinfo.lo
      ../../src/nodeinfo.c: In function 'virNodeGetSiblingsList':
      ../../src/nodeinfo.c:1543:30: error: 'SYSFS_THREAD_SIBLINGS_LIST_LENGTH_MAX' undeclared (first use in this function)
           if (virFileReadAll(path, SYSFS_THREAD_SIBLINGS_LIST_LENGTH_MAX, &buf) < 0)
                                    ^
      ../../src/nodeinfo.c:1543:30: note: each undeclared identifier is reported only once for each function it appears in
      ../../src/nodeinfo.c: In function 'virNodeCapsFillCPUInfo':
      ../../src/nodeinfo.c:1562:5: error: implicit declaration of function 'virNodeGetCpuValue' [-Werror=implicit-function-declaration]
           if ((tmp = virNodeGetCpuValue(SYSFS_CPU_PATH, cpu_id,
           ^
      ../../src/nodeinfo.c:1562:5: error: nested extern declaration of 'virNodeGetCpuValue' [-Werror=nested-externs]
      ../../src/nodeinfo.c:1562:35: error: 'SYSFS_CPU_PATH' undeclared (first use in this function)
           if ((tmp = virNodeGetCpuValue(SYSFS_CPU_PATH, cpu_id,
                                         ^
      cc1: all warnings being treated as errors
      
      * src/nodeinfo.c (virNodeCapsFillCPUInfo): Make conditional.
      (virNodeGetSiblingsList): Move into #ifdef linux block.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      adb44955
  5. 04 11月, 2013 8 次提交
  6. 22 10月, 2013 1 次提交
  7. 16 10月, 2013 1 次提交
  8. 09 10月, 2013 1 次提交
  9. 07 10月, 2013 1 次提交
    • R
      nodeinfo: make freebsdNodeGetCPUCount work on Mac OS X · 2d74822a
      Ryota Ozaki 提交于
      This fixes the following error:
        error : nodeGetInfo:933 : this function is not supported
        by the connection driver: node info not implemented on this platform
      
      The freebsdNodeGetCPUCount was renamed to appleFreebsdNodeGetCPUCount
      in order to make more visible the fact, that it works on Mac OS X too.
      
      Mac OS X can use sysctlbyname as same as FreeBSD to get the CPU
      frequency. However, the MIB style name is different from FreeBSD's.
      And the unit of the return frequency is also different.
      Signed-off-by: NRyota Ozaki <ozaki.ryota@gmail.com>
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      2d74822a
  10. 22 8月, 2013 1 次提交
  11. 12 7月, 2013 1 次提交
    • H
      nodeinfo: Don't fail on non-contiguous NUMA topologies · 6d986d99
      hejia hejia 提交于
      nodeGetFreeMemory and nodeGetCellsFreeMemory assumed that the NUMA nodes
      are contiguous and starting from 0. Unfortunately there are machines
      that don't match this assumption:
      
      available: 1 nodes (1)
      node 1 cpus: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
      node 1 size: 16340 MB
      node 1 free: 11065 MB
      
      Before this patch:
      error: internal error Failed to query NUMA free memory
      error: internal error Failed to query NUMA free memory for node: 0
      
      After this patch:
      Total: 15772580 KiB
      0: 0 KiB
      Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      6d986d99
  12. 11 7月, 2013 1 次提交
  13. 10 7月, 2013 2 次提交
  14. 25 6月, 2013 1 次提交
  15. 21 5月, 2013 1 次提交
  16. 10 5月, 2013 1 次提交
  17. 08 5月, 2013 1 次提交
    • D
      Separate internal node device APIs from public API · 1c6d4ca5
      Daniel P. Berrange 提交于
      The individual hypervisor drivers were directly referencing
      APIs in src/nodeinfo.c in their virDriverPtr struct. Separate
      these methods, so there is always a wrapper in the hypervisor
      driver. This allows the unused virConnectPtr args to be
      removed from the nodeinfo.c file. Again this will ensure that
      ACL checks will only be performed on invocations that are
      directly associated with public API usage.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      1c6d4ca5
  18. 02 5月, 2013 1 次提交
    • M
      virutil: Move string related functions to virstring.c · 7c9a2d88
      Michal Privoznik 提交于
      The source code base needs to be adapted as well. Some files
      include virutil.h just for the string related functions (here,
      the include is substituted to match the new file), some include
      virutil.h without any need (here, the include is removed), and
      some require both.
      7c9a2d88
  19. 04 4月, 2013 2 次提交
  20. 11 3月, 2013 1 次提交
  21. 09 3月, 2013 1 次提交
  22. 24 1月, 2013 3 次提交
    • D
      Ensure nodeinfo struct is initialized to zero · 83b4137d
      Daniel P. Berrange 提交于
      When linuxNodeInfoCPUPopulate() method triggered use of an
      uninitialize value, since it did not initialize the 'sockets'
      field in the virNodeInfoPtr struct:
      
      ==30020== Conditional jump or move depends on uninitialised value(s)
      ==30020==    at 0x5125DBD: linuxNodeInfoCPUPopulate (nodeinfo.c:513)
      ==30020==    by 0x51261A0: nodeGetInfo (nodeinfo.c:884)
      ==30020==    by 0x149B9B10: qemuCapsInit (qemu_capabilities.c:846)
      ==30020==    by 0x14A11B25: qemuCreateCapabilities (qemu_driver.c:424)
      ==30020==    by 0x14A12426: qemuStartup (qemu_driver.c:874)
      ==30020==    by 0x512A7AF: virStateInitialize (libvirt.c:822)
      ==30020==    by 0x40DE04: daemonRunStateInit (libvirtd.c:877)
      ==30020==    by 0x50ADCE5: virThreadHelper (virthreadpthread.c:161)
      ==30020==    by 0x328CA07D14: start_thread (pthread_create.c:308)
      ==30020==    by 0x328C6F246C: clone (clone.S:114)
      (happened twice)
      
              if (socks > nodeinfo->sockets)    <--- here
                  nodeinfo->sockets = socks;
      
      Rather than doing this for each field, just make the caller memset
      the entire struct to zero.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      83b4137d
    • P
      capabilities: Add additional data to the NUMA topology info · 79a003f9
      Peter Krempa 提交于
      This patch adds data gathering to the NUMA gathering files and adds
      support for outputting the data. The test driver and xend driver need to
      be adapted to fill sensible data to the structure in a future patch.
      79a003f9
    • P
      capabilities: Switch CPU data in NUMA topology to a struct · 87b4c10c
      Peter Krempa 提交于
      This will allow storing additional topology data in the NUMA topology
      definition.
      
      This patch changes the storage type and fixes fallout of the change
      across the drivers using it.
      
      This patch also changes semantics of adding new NUMA cell information.
      Until now the data were re-allocated and copied to the topology
      definition. This patch changes the addition function to steal the
      pointer to a pre-allocated structure to simplify the code.
      87b4c10c
  23. 23 1月, 2013 1 次提交
  24. 22 1月, 2013 1 次提交
    • J
      nodeinfo: Add coverity[dead_error_begin] and [returned_null] tags · 316ed412
      John Ferlan 提交于
      The use of switch statements inside a bounded for loop resulted in some
      false positives regarding the "default:" label which cannot be reached
      since each of the other case statements use the possible for loop values.
      A [dead_error_begin] was added before the default label.
      
      Commit id ebdbe25a adjusted the algorithm and the caller guarantees that
      the 'params' will have a '_' in the name being searched. Add the [returned_null]
      tag to the two instances.
      316ed412
  25. 14 1月, 2013 1 次提交
  26. 21 12月, 2012 4 次提交