1. 10 7月, 2013 1 次提交
  2. 25 6月, 2013 1 次提交
  3. 21 5月, 2013 1 次提交
  4. 10 5月, 2013 1 次提交
  5. 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
  6. 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
  7. 04 4月, 2013 2 次提交
  8. 11 3月, 2013 1 次提交
  9. 09 3月, 2013 1 次提交
  10. 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
  11. 23 1月, 2013 1 次提交
  12. 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
  13. 14 1月, 2013 1 次提交
  14. 21 12月, 2012 4 次提交
  15. 19 12月, 2012 2 次提交
  16. 29 11月, 2012 1 次提交
    • O
      node_memory: Do not fail if there is parameter unsupported · ebdbe25a
      Osier Yang 提交于
      It makes no sense to fail the whole getting command if there is
      a parameter unsupported by the kernel. This patch fixes it by
      omitting the unsupported parameter for getMemoryParameters.
      
      And for setMemoryParameters, this checks if there is an unsupported
      parameter up front of the setting, and just returns failure if not
      all parameters are supported.
      ebdbe25a
  17. 17 11月, 2012 2 次提交
    • E
      nodeinfo: port nodecpumap to RHEL5 · 9504ae5b
      Eric Blake 提交于
      Prior to this patch, 'virsh nodecpumap' on older kernels reported:
      error: Unable to get cpu map
      error: out of memory
      
      * src/nodeinfo.c (linuxParseCPUmax): Don't overwrite error.
      (nodeGetCPUBitmap): Provide backup implementation.
      9504ae5b
    • E
      nodeinfo: support kernels that lack socket information · 47976b48
      Eric Blake 提交于
      On RHEL 5, I was getting a segfault trying to start libvirtd,
      because we were failing virNodeParseSocket but not checking
      for errors, and then calling CPU_SET(-1, &sock_map) as a result.
      But if you don't have a topology/physical_package_id file,
      then you can just assume that the cpu belongs to socket 0.
      
      * src/nodeinfo.c (virNodeGetCpuValue): Change bool into
      default_value.
      (virNodeParseSocket): Allow for default value when file is missing,
      different from fatal error on reading file.
      (virNodeParseNode): Update call sites to fail on error.
      47976b48
  18. 15 11月, 2012 1 次提交
  19. 13 11月, 2012 1 次提交
    • P
      nodeinfo: Add check and workaround to guarantee valid cpu topologies · 9576afd1
      Peter Krempa 提交于
      Lately there were a few reports of the output of the virsh nodeinfo
      command being inaccurate. This patch tries to avoid that by checking if
      the topology actually makes sense. If it doesn't we then report a
      synthetic topology that indicates to the user that the host capabilities
      should be checked for the actual topology.
      9576afd1
  20. 02 11月, 2012 2 次提交
    • D
      Remove spurious whitespace between function name & open brackets · 1c04f999
      Daniel P. Berrange 提交于
      The libvirt coding standard is to use 'function(...args...)'
      instead of 'function (...args...)'. A non-trivial number of
      places did not follow this rule and are fixed in this patch.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      1c04f999
    • E
      cpumap: optimize for clients that don't need online count · 3d0130cb
      Eric Blake 提交于
      It turns out that calling virNodeGetCPUMap(conn, NULL, NULL, 0)
      is both useful, and with Viktor's patches, common enough to
      optimize.  Since this interface hasn't been released yet, we
      can change the RPC call.
      
      A bit more background on the optimization - learning the cpu count
      is a single file read (/sys/devices/system/cpu/possible), but
      learning the number of online cpus can possibly trigger a file
      read per cpu, depending on the age of the kernel, and all wasted
      if the caller passed NULL for both arguments.
      
      * src/nodeinfo.c (nodeGetCPUMap): Avoid bitmap when not needed.
      * src/remote/remote_protocol.x (remote_node_get_cpu_map_args):
      Supply two separate flags for needed arguments.
      * src/remote/remote_driver.c (remoteNodeGetCPUMap): Update
      caller.
      * daemon/remote.c (remoteDispatchNodeGetCPUMap): Likewise.
      * src/remote_protocol-structs: Regenerate.
      3d0130cb
  21. 30 10月, 2012 1 次提交
    • E
      build: place attributes in correct location · c047f547
      Eric Blake 提交于
      Ever since commit eefb881d, ATTRIBUTE_NONNULL has normally been a
      no-op under gcc (since it tends to cause more bugs than it cures
      given gcc's current lame implementation of the attribute).  However,
      the macro is still useful to Coverity and other static-analysis
      tools, but only if we use it correctly.  Coverity follows gcc's lead
      in accepting function declarations with attributes at the end, but
      function bodies must attach attributes to the return type.  That is,
      these are valid:
      
      void foo(void *arg) ATTRIBUTE_NONNULL(1);
      void ATTRIBUTE_NONNULL(1) foo(void *arg);
      void ATTRIBUTE_NONNULL(1) foo(void *arg) {}
      
      but this is not:
      
      void foo(void *arg) ATTRIBUTE_NONNULL(1) {}
      
      even though you don't get a compile failure until you do static
      analysis.  Bug introduced in commit 80533ca2, with these symptoms:
      
      nodeinfo.c:206: error: expected ',' or ';' before '{' token
      cc1: warning: unrecognized command line option "-Wno-suggest-attribute=const"
      cc1: warning: unrecognized command line option "-Wno-suggest-attribute=pure"
      make[3]: *** [libvirt_driver_la-nodeinfo.lo] Error 1
      
      * src/nodeinfo.c (virNodeParseNode): Fix syntax error when
      non-null attribute is in use.
      c047f547
  22. 27 10月, 2012 1 次提交
    • E
      cpustat: fix regression when cpus are offline · 4fbf322f
      Eric Blake 提交于
      It turns out that the cpuacct results properly account for offline
      cpus, and always returns results for every possible cpu, not just
      the online ones.  So there is no need to check the map of online
      cpus in the first place, merely only a need to know the maximum
      possible cpu.  Meanwhile, virNodeGetCPUBitmap had a subtle change
      from returning the maximum id to instead returning the width of
      the bitmap (one larger than the maximum id) in commit 2f4c5338,
      which made this code encounter some off-by-one logic leading to
      bad error messages when a cpu was offline:
      
      $ virsh cpu-stats dom
      error: Failed to virDomainGetCPUStats()
      
      error: An error occurred, but the cause is unknown
      
      Cleaning this up unraveled a chain of other unused variables.
      
      * src/qemu/qemu_driver.c (qemuDomainGetPercpuStats): Drop
      pointless check for cpumap changes, and use correct number of
      cpus.  Simplify signature.
      (qemuDomainGetCPUStats): Adjust caller.
      * src/nodeinfo.h (nodeGetCPUCount): New prototype.
      (nodeGetCPUBitmap): Drop unused parameter.
      * src/nodeinfo.c (nodeGetCPUBitmap): Likewise.
      (nodeGetCPUMap): Adjust caller.
      (nodeGetCPUCount): New function.
      * src/libvirt_private.syms (nodeinfo.h): Export it.
      4fbf322f
  23. 26 10月, 2012 2 次提交
    • V
      virNodeGetCPUMap: Implement support function in nodeinfo · d34439c9
      Viktor Mihajlovski 提交于
      Added an implemention of virNodeGetCPUMap to nodeinfo.c,
      (nodeGetCPUMap) which can be used by all drivers for a Linux
      hypervisor host.
      Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
      d34439c9
    • E
      nodeinfo: improve probing node cpu bitmap · 2f4c5338
      Eric Blake 提交于
      Callers should not need to know what the name of the file to
      be read in the Linux-specific version of nodeGetCPUmap;
      furthermore, qemu cares about online cpus, not present cpus,
      when determining which cpus to skip.
      
      While at it, I fixed the fact that we were computing the maximum
      online cpu id by doing a slow iteration, when what we really want
      to know is the max available cpu.
      
      * src/nodeinfo.h (nodeGetCPUmap): Rename...
      (nodeGetCPUBitmap): ...and simplify signature.
      * src/nodeinfo.c (linuxParseCPUmax): New function.
      (linuxParseCPUmap): Simplify and alter signature.
      (nodeGetCPUBitmap): Change implementation.
      * src/libvirt_private.syms (nodeinfo.h): Reflect rename.
      * src/qemu/qemu_driver.c (qemuDomainGetPercpuStats): Update
      caller.
      2f4c5338
  24. 15 10月, 2012 1 次提交
    • O
      node_memory: Add new parameter field to tune the new sysfs knob · f81f0f2f
      Osier Yang 提交于
      Upstream kernel introduced new sysfs knob "merge_across_nodes" to
      specify if pages from different numa nodes can be merged. When set
      to 0, only pages which physically reside in the memory area of
      same NUMA node can be merged. When set to 1, pages from all nodes
      can be merged.
      
      This patch supports the tuning by adding new param field
      "shm_merge_across_nodes".
      f81f0f2f
  25. 09 10月, 2012 1 次提交
  26. 28 9月, 2012 1 次提交
  27. 21 9月, 2012 1 次提交
  28. 19 9月, 2012 1 次提交
  29. 18 9月, 2012 2 次提交