1. 14 7月, 2015 4 次提交
  2. 23 1月, 2015 1 次提交
    • J
      Fix virCgroupGetPercpuStats with non-continuous present CPUs · af1c98e4
      Ján Tomko 提交于
      Per-cpu stats are only shown for present CPUs in the cgroups,
      but we were only parsing the largest CPU number from
      /sys/devices/system/cpu/present and looking for stats even for
      non-present CPUs.
      This resulted in:
      internal error: cpuacct parse error
      af1c98e4
  3. 25 9月, 2014 1 次提交
  4. 19 6月, 2014 2 次提交
  5. 10 3月, 2014 1 次提交
  6. 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
  7. 17 4月, 2013 1 次提交
  8. 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
  9. 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
  10. 21 9月, 2012 1 次提交
  11. 18 9月, 2012 1 次提交
  12. 17 9月, 2012 1 次提交
    • O
      node_memory: Implement the internal APIs · aaa8ab3e
      Osier Yang 提交于
      Only implemented for linux platform.
      
      * src/nodeinfo.h: (Declare node{Get,Set}MemoryParameters)
      * src/nodeinfo.c: (Implement node{Get,Set}MemoryParameters)
      * src/libvirt_private.syms: (Export those two new internal APIs to
        private symbols)
      aaa8ab3e
  13. 23 7月, 2012 1 次提交
    • O
      Desert the FSF address in copyright · f9ce7dad
      Osier Yang 提交于
      Per the FSF address could be changed from time to time, and GNU
      recommends the following now: (http://www.gnu.org/licenses/gpl-howto.html)
      
        You should have received a copy of the GNU General Public License
        along with Foobar.  If not, see <http://www.gnu.org/licenses/>.
      
      This patch removes the explicit FSF address, and uses above instead
      (of course, with inserting 'Lesser' before 'General').
      
      Except a bunch of files for security driver, all others are changed
      automatically, the copyright for securify files are not complete,
      that's why to do it manually:
      
        src/security/security_selinux.h
        src/security/security_driver.h
        src/security/security_selinux.c
        src/security/security_apparmor.h
        src/security/security_apparmor.c
        src/security/security_driver.c
      f9ce7dad
  14. 07 3月, 2012 1 次提交
  15. 14 7月, 2011 1 次提交
    • E
      build: avoid ATTRIBUTE_UNUSED in headers · 088473b2
      Eric Blake 提交于
      The compiler might optimize based on our declaration that something
      is unused.  Putting that declaration in the header risks getting
      out of sync with the actual implementation, so it belongs better
      only in the .c files.  We were mostly compliant, and a new syntax
      check will help us in the future.
      
      * cfg.mk (sc_avoid_attribute_unused_in_header): New syntax check.
      * src/nodeinfo.h (nodeGetCPUStats, nodeGetMemoryStats): Delete
      attribute already present in .c file.
      * src/qemu/qemu_domain.h (qemuDomainEventFlush): Likewise.
      * src/util/virterror_internal.h (virReportErrorHelper): Parameters
      are actually used by .c file.
      * src/xenxs/xen_sxpr.h (xenFormatSxprDisk): Adjust prototype.
      * src/xenxs/xen_sxpr.c (xenFormatSxprDisk): Delete unused argument.
      (xenFormatSxpr): Adjust caller.
      * src/xen/xend_internal.c (xenDaemonAttachDeviceFlags)
      (xenDaemonUpdateDeviceFlags): Likewise.
      Suggested by Daniel Veillard.
      088473b2
  16. 13 7月, 2011 1 次提交
    • E
      util: reject unknown flags, and prefer unsigned flags · 833fe8ab
      Eric Blake 提交于
      Silently ignored flags get in the way of new features that
      use those flags.  Also, an upcoming syntax check will favor
      unsigned flags.
      
      * src/nodeinfo.h (nodeGetCPUStats, nodeGetMemoryStats): Drop
      unused attribute.
      * src/interface/netcf_driver.c (interfaceOpenInterface)
      (interfaceDefineXML, interfaceCreate, interfaceDestroy): Reject
      unknown flags.
      * src/network/bridge_driver.c (networkOpenNetwork)
      (networkGetXMLDesc): Likewise.
      * src/nwfilter/nwfilter_driver.c (nwfilterOpen): Likewise.
      * src/secret/secret_driver.c (secretOpen, secretDefineXML)
      (secretGetXMLDesc, secretSetValue): Likewise.
      * src/util/logging.c (virLogDefineFilter, virLogDefineOutput)
      (virLogMessage): Likewise; also use unsigned flags.
      * src/util/logging.h (virLogDefineFilter, virLogDefineOutput)
      (virLogMessage): Change signature.
      * src/util/command.c (virExecWithHook): Likewise.
      833fe8ab
  17. 28 6月, 2011 1 次提交
  18. 15 6月, 2011 2 次提交
  19. 10 3月, 2010 1 次提交
  20. 03 6月, 2009 1 次提交
  21. 22 12月, 2008 1 次提交
    • J
      make NUMA-initialization code more portable and more robust · d010b689
      Jim Meyering 提交于
      qemudCapsInitNUMA and umlCapsInitNUMA were identical, so this change
      factors them into a new function, virCapsInitNUMA, and puts it in
      nodeinfo.c.
      
      In addition to factoring out the duplicates, this change also
      adjusts that function definition (along with its macros) so
      that it works with Fedora 9's numactl version 1, and makes it
      so the code will work even if someone builds the kernel with
      CONFIG_NR_CPUS > 4096.
      
      Finally, also perform this NUMA initialization for the lxc
      and openvz drivers.
      
      * src/nodeinfo.c: Include <stdint.h>, <numa.h> and "memory.h".
      (virCapsInitNUMA): Rename from qemudCapsInitNUMA and umlCapsInitNUMA.
      (NUMA_MAX_N_CPUS): Define depending on NUMA API version.
      (n_bits, MASK_CPU_ISSET): Define, adjust, use uint64 rather than long.
      * src/nodeinfo.h: Include "capabilities.h".
      (virCapsInitNUMA): Declare it.
      * examples/domain-events/events-c/Makefile.am:
      * src/Makefile.am: Add $(NUMACTL_CFLAGS) and $(NUMACTL_LIBS) to various
      compile/link-related variables.
      * src/qemu_conf.c: Include "nodeinfo.h".
      (qemudCapsInitNUMA): Remove duplicate code.  Adjust caller.
      * src/uml_conf.c (umlCapsInitNUMA): Likewise.
      Include "nodeinfo.h".
      * src/lxc_conf.c: Include "nodeinfo.h".
      (lxcCapsInit): Perform NUMA initialization here, too.
      * src/openvz_conf.c (openvzCapsInit): And here.
      Include "nodeinfo.h".
      * src/libvirt_sym.version.in: Add virCapsInitNUMA so that libvirtd
      can link to this function.
      d010b689
  22. 21 8月, 2008 1 次提交
  23. 08 2月, 2008 1 次提交
    • M
      Fix gcc-4.3.0 "inlining failed" warning. · 3da5504e
      Mark McLoughlin 提交于
      * src/internal.h: move xstrol() variants from here ...
      
      * src/util.[ch]: ... to here and rename to virStrToLong()
      
      * src/libvirt_sym.version: export __virStrToLong_i() for
      virsh and qemud.
      
      * src/nodeinfo.c, src/stats_linux.c, src/virsh.c,
        src/xend_internal.c, qemud/qemud.c: replace xstrtol()
      calls with virStrToLong()
      
      * src/nodeinfo.h: don't include internal.h, which was only
      needed for xstrtol(), but instead include libvirt.h which
      is suffificient for the declarations in the header.
      3da5504e
  24. 26 7月, 2007 1 次提交
  25. 29 6月, 2007 1 次提交
  26. 27 6月, 2007 9 次提交