1. 21 5月, 2010 2 次提交
  2. 04 5月, 2010 1 次提交
  3. 24 4月, 2010 1 次提交
  4. 01 4月, 2010 1 次提交
    • M
      cgroup: Replace sscanf with virStrToLong_ll · 73b45bfb
      Matthias Bolte 提交于
      The switch from %lli to %lld in virCgroupGetValueI64 is intended,
      as virCgroupGetValueU64 uses base 10 too, and virCgroupSetValueI64
      uses %lld to format the number to string.
      
      Parsing is stricter now and doesn't accept trailing characters
      after the actual value anymore.
      73b45bfb
  5. 22 3月, 2010 1 次提交
    • J
      Avoid libvirtd crash when cgroups is not configured on host · 09fafa1e
      Jim Fehlig 提交于
      Invoking virDomainSetMemory() on lxc driver results in libvirtd
      segfault when cgroups has not been configured on the host.
      
      Ensure driver->cgroup is non-null before invoking
      virCgroupForDomain().  To prevent similar segfaults in the future,
      ensure driver parameter to virCgroupForDomain() is non-null before
      dereferencing.
      09fafa1e
  6. 10 3月, 2010 1 次提交
  7. 05 3月, 2010 1 次提交
  8. 09 2月, 2010 1 次提交
  9. 05 2月, 2010 2 次提交
  10. 13 11月, 2009 1 次提交
    • D
      Fix check for existance of cgroups at creation · d11d93f4
      Daniel P. Berrange 提交于
      In the scenario where the cgroups were mounted but the
      particular group did not exist, and the caller had not
      requested auto-creation, the code would fail to return
      an error condition. This caused the lxc_controller to
      think the cgroup existed, and it then later failed when
      attempting to use it
      
      * src/util/cgroup.c: Raise an error if the cgroup path does not
        exist
      d11d93f4
  11. 19 10月, 2009 1 次提交
    • R
      LXC fix virCgroupGetValueStr problem with \n · 41fa653f
      Ryota Ozaki 提交于
      A cgroup file returns integer value terminated with '\n' and remaining
      it has sometimes harmful effects, for example it leads virStrToLong_ull
      to fail.
      * src/util/cgroup.c: strip out terminating \n when reading a value
      41fa653f
  12. 08 10月, 2009 2 次提交
  13. 07 10月, 2009 1 次提交
    • R
      LXC implement memory control APIs · 3a05dc09
      Ryota Ozaki 提交于
      The patch implements the missing memory control APIs for lxc, i.e.,
      domainGetMaxMemory, domainSetMaxMemory, domainSetMemory, and improves
      domainGetInfo to return proper amount of used memory via cgroup.
      
      * src/libvirt_private.syms: Export virCgroupGetMemoryUsage
        and add missing virCgroupSetMemory
      * src/lxc/lxc_driver.c: Implement missing memory functions
      * src/util/cgroup.c, src/util/cgroup.h: Add the function
        to get used memory
      3a05dc09
  14. 22 9月, 2009 1 次提交
    • R
      lxc: suspend/resume support · c8c9ef27
      Ryota Ozaki 提交于
      * src/conf/domain_conf.c: Don't assume all virDomainObjPtr have
        a non-NULL monitor_chr field in virDomainObjFormat.
      * src/lxc/lxc_driver.c: Implement suspend/resume driver APis
      * src/util/cgroup.c, src/util/cgroup.h: Support the 'freezer'
        cgroup controller
      * src/libvirt_private.syms: Export virCgroupSetFreezerState
        and virCgroupGetFreezerState
      c8c9ef27
  15. 21 9月, 2009 1 次提交
    • D
      Move all shared utility files to src/util/ · 1355e055
      Daniel P. Berrange 提交于
      * src/bridge.c, src/bridge.h, src/buf.c, src/buf.h, src/cgroup.c,
        src/cgroup.h, src/conf.c, src/conf.h, src/event.c, src/event.h,
        src/hash.c, src/hash.h, src/hostusb.c, src/hostusb.h,
        src/iptables.c, src/iptables.h, src/logging.c, src/logging.h,
        src/memory.c, src/memory.h, src/pci.c, src/pci.h, src/qparams.c,
        src/qparams.h, src/stats_linux.c, src/stats_linux.h,
        src/threads-pthread.c, src/threads-pthread.h, src/threads-win32.c,
        src/threads-win32.h, src/threads.c, src/threads.h, src/util.c,
        src/util.h, src/uuid.c, src/uuid.h, src/virterror.c,
        src/virterror_internal.h, src/xml.c, src/xml.h: Move all files
        into src/util/
      * daemon/Makefile.am: Add -Isrc/util/ to build flags
      * src/Makefile.am: Add -Isrc/util/ to build flags and update for
        moved files
      * src/libvirt_private.syms: Export cgroup APIs since they're now
        in util rather than linking directly to drivers
      * src/xen/xs_internal.c: Disable bogus virEventRemoveHandle call
        when built under PROXY
      * proxy/Makefile.am: Update for changed file locations. Remove
        bogus build of event.c
      * tools/Makefile.am, tests/Makefile.am: Add -Isrc/util/ to build flags
      1355e055
  16. 24 7月, 2009 6 次提交
    • D
      Fix cgroup compile warnings · 1112330e
      Daniel P. Berrange 提交于
      * src/cgroup.c: Fix cast to uint64 from unsigned long long
      1112330e
    • D
      Make QEMU cgroups use configurable · f4c3acdf
      Daniel P. Berrange 提交于
       * qemud/libvirtd_qemu.aug, qemud/test_libvirtd_qemu.aug,
         src/qemu.conf: Add 'cgroups_controllers' and 'cgroups_device_acl'
         parameters
       * src/qemu_conf.h, src/qemu_conf.c: Load & parse configuration params
         for cgroups
       * src/qemu_driver.c: Only use cgroups controllers that are activated,
         and use configured device whitelist instead of default, if set.
      f4c3acdf
    • D
      Use cgroups for block device whitelisting in QEMU guests · e88d638a
      Daniel P. Berrange 提交于
      * src/qemu_driver.c: Set a restrictive block device whitelist for
        all QEMU guests. Update whitelist when hotplugging disks.
      * src/cgroup.h, src/cgroup.c: Add some more convenience methods
        for dealing with block device whitelists.
      e88d638a
    • D
      Implement schedular tunables API using cgroups · 55bc5090
      Daniel P. Berrange 提交于
      * src/qemu_driver.c:  Add driver methods qemuGetSchedulerType,
        qemuGetSchedulerParameters, qemuSetSchedulerParameters
      * src/lxc_driver.c: Fix to use unsigned long long consistently
        for schedular parameters
      * src/cgroup.h, src/cgroup.c: Fix cpu_shares to take unsigned
        long long
      * src/util.c, src/util.h, src/libvirt_private.syms: Add a
        virStrToDouble helper
      * src/virsh.c: Fix handling of --set arg to schedinfo command
        to honour the designated data type of each schedular tunable
        as declared by the driver
      55bc5090
    • D
      Refactor cgroups to allow a group per driver to be managed directly · 946c489c
      Daniel P. Berrange 提交于
      Allow the driver level cgroup to be managed explicitly by the
      hypervisor drivers, in order to detect whether to enable or
      disable cgroup support for domains. Provides better error
      reporting of failures. Also allow for creation of cgroups for
      unprivileged drivers if controller is accessible by the user.
      
      * src/cgroup.c, src/cgroup.h: Add an API to obtain a driver cgroup
      * src/lxc_conf.h, src/lxc_controller.c, src/lxc_driver.c:
        Obtain a driver cgroup at startup and use that instead of
        re-creating everytime.
      * src/util.c, src/util.h, src/libvirt_private.syms: Add a
        virGetUserName() helper
      946c489c
    • D
      Make cgroups a little more efficient · de1ecd53
      Daniel P. Berrange 提交于
      * src/cgroup.c: Detect the mount location of every controller at
        time a virCgroupPtr is created. Detect current process' placement
        within group to avoid assuming it is in the root. Pass controller
        ID into SetValueStr/GetValueStr to enable much duplicated code to
        be eliminated
      de1ecd53
  17. 23 7月, 2009 2 次提交
  18. 08 5月, 2009 1 次提交
  19. 16 3月, 2009 1 次提交
  20. 06 3月, 2009 1 次提交
  21. 06 2月, 2009 1 次提交
    • J
      remove useless code · a9aa76ba
      Jim Meyering 提交于
      * src/bridge.c (brAddTap): Remove redundant errno=ENOMEM assignment
      after failed strdup.
      * src/cgroup.c (virCgroupFree): Remove redundant *group=NULL assignment
      after VIR_FREE(*group).
      * src/lxc_driver.c (lxcShutdown): Likewise.
      * src/xen_unified.c (xenUnifiedClose): Likewise.
      * src/xm_internal.c (xenXMDomainConfigFormat): Rewrite disk-
      and net-config-setting code to be clearer.
      a9aa76ba
  22. 23 12月, 2008 1 次提交
  23. 07 11月, 2008 1 次提交
    • D
      add new logging module, and move existing definitions there · df93e1ee
      Daniel Veillard 提交于
      * src/logging.c src/logging.h proxy/Makefile.am proxy/libvirt_proxy.c
        src/Makefile.am src/cgroup.c src/datatypes.c src/domain_event.c
        src/internal.h src/libvirt.c src/lxc_container.c src/lxc_controller.c
        src/lxc_driver.c src/proxy_internal.c src/qemu_driver.c
        src/remote_internal.c src/storage_backend_disk.c src/util.c
        src/veth.c src/xen_internal.c src/xen_unified.c src/xend_internal.c:
        add new logging module, and move existing definitions there
      Daniel
      df93e1ee
  24. 22 10月, 2008 1 次提交
  25. 09 10月, 2008 1 次提交
  26. 08 10月, 2008 2 次提交
  27. 04 10月, 2008 1 次提交