1. 03 6月, 2015 1 次提交
    • P
      conf: Refactor emulatorpin handling · ee3da892
      Peter Krempa 提交于
      Store the emulator pinning cpu mask as a pure virBitmap rather than the
      virDomainPinDef since it stores only the bitmap and refactor
      qemuDomainPinEmulator to do the same operations in a much saner way.
      
      As a side effect virDomainEmulatorPinAdd and virDomainEmulatorPinDel can
      be removed since they don't add any value.
      ee3da892
  2. 20 5月, 2015 1 次提交
  3. 28 4月, 2015 2 次提交
    • J
      Move iothreadspin information into iothreadids · b266486f
      John Ferlan 提交于
      Remove the iothreadspin array from cputune and replace with a cpumask
      to be stored in the iothreadids list.
      
      Adjust the test output because our printing goes in order of the iothreadids
      list now.
      b266486f
    • J
      qemu: Use domain iothreadids to IOThread's 'thread_id' · 8d4614a5
      John Ferlan 提交于
      Add 'thread_id' to the virDomainIOThreadIDDef as a means to store the
      'thread_id' as returned from the live qemu monitor data.
      
      Remove the iothreadpids list from _qemuDomainObjPrivate and replace with
      the new iothreadids 'thread_id' element.
      
      Rather than use the default numbering scheme of 1..number of iothreads
      defined for the domain, use the iothreadid's list for the iothread_id
      
      Since iothreadids list keeps track of the iothread_id's, these are
      now used in place of the many places where a for loop would "know"
      that the ID was "+ 1" from the array element.
      
      The new tests ensure usage of the <iothreadid> values for an exact number
      of iothreads and the usage of a smaller number of <iothreadid> values than
      iothreads that exist (and usage of the default numbering scheme).
      8d4614a5
  4. 24 4月, 2015 1 次提交
  5. 10 4月, 2015 1 次提交
  6. 08 4月, 2015 3 次提交
    • L
      fix memleak in qemuRestoreCgroupState · 7cd0cf05
      Luyao Huang 提交于
       131,088 bytes in 16 blocks are definitely lost in loss record 2,174 of 2,176
          at 0x4C29BFD: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
          by 0x4C2BACB: realloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
          by 0x52A026F: virReallocN (viralloc.c:245)
          by 0x52BFCB5: saferead_lim (virfile.c:1268)
          by 0x52C00EF: virFileReadLimFD (virfile.c:1328)
          by 0x52C019A: virFileReadAll (virfile.c:1351)
          by 0x52A5D4F: virCgroupGetValueStr (vircgroup.c:763)
          by 0x1DDA0DA3: qemuRestoreCgroupState (qemu_cgroup.c:805)
          by 0x1DDA0DA3: qemuConnectCgroup (qemu_cgroup.c:857)
          by 0x1DDB7BA1: qemuProcessReconnect (qemu_process.c:3694)
          by 0x52FD171: virThreadHelper (virthread.c:206)
          by 0x82B8DF4: start_thread (pthread_create.c:308)
          by 0x85C31AC: clone (clone.S:113)
      Signed-off-by: NLuyao Huang <lhuang@redhat.com>
      7cd0cf05
    • M
      virQEMUDriverGetConfig: Fix memleak · 225aa802
      Michal Privoznik 提交于
      ==19015== 968 (416 direct, 552 indirect) bytes in 1 blocks are definitely lost in loss record 999 of 1,049
      ==19015==    at 0x4C2C070: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
      ==19015==    by 0x52ADF14: virAllocVar (viralloc.c:560)
      ==19015==    by 0x5302FD1: virObjectNew (virobject.c:193)
      ==19015==    by 0x1DD9401E: virQEMUDriverConfigNew (qemu_conf.c:164)
      ==19015==    by 0x1DDDF65D: qemuStateInitialize (qemu_driver.c:666)
      ==19015==    by 0x53E0823: virStateInitialize (libvirt.c:777)
      ==19015==    by 0x11E067: daemonRunStateInit (libvirtd.c:905)
      ==19015==    by 0x53201AD: virThreadHelper (virthread.c:206)
      ==19015==    by 0xA1EE1F2: start_thread (in /lib64/libpthread-2.19.so)
      ==19015==    by 0xA4EFC8C: clone (in /lib64/libc-2.19.so)
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      225aa802
    • M
      qemuSetupCgroupForVcpu: Fix memleak · 9dbe6f31
      Michal Privoznik 提交于
      ==19015== 1,064 (656 direct, 408 indirect) bytes in 2 blocks are definitely lost in loss record 1,002 of 1,049
      ==19015==    at 0x4C2C070: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
      ==19015==    by 0x52AD74B: virAlloc (viralloc.c:144)
      ==19015==    by 0x52B47CA: virCgroupNew (vircgroup.c:1057)
      ==19015==    by 0x52B53E5: virCgroupNewVcpu (vircgroup.c:1451)
      ==19015==    by 0x1DD85A40: qemuSetupCgroupForVcpu (qemu_cgroup.c:1013)
      ==19015==    by 0x1DDA66EA: qemuProcessStart (qemu_process.c:4844)
      ==19015==    by 0x1DDF1807: qemuDomainObjStart (qemu_driver.c:7265)
      ==19015==    by 0x1DDF1A66: qemuDomainCreateWithFlags (qemu_driver.c:7320)
      ==19015==    by 0x1DDF1ACD: qemuDomainCreate (qemu_driver.c:7337)
      ==19015==    by 0x53F87EA: virDomainCreate (libvirt-domain.c:6820)
      ==19015==    by 0x12690A: remoteDispatchDomainCreate (remote_dispatch.h:3481)
      ==19015==    by 0x126827: remoteDispatchDomainCreateHelper (remote_dispatch.h:3457)
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      9dbe6f31
  7. 02 4月, 2015 7 次提交
  8. 20 3月, 2015 1 次提交
  9. 16 3月, 2015 2 次提交
  10. 06 3月, 2015 1 次提交
    • P
      memtune: change the way how we store unlimited value · cf521fc8
      Pavel Hrdina 提交于
      There was a mess in the way how we store unlimited value for memory
      limits and how we handled values provided by user.  Internally there
      were two possible ways how to store unlimited value: as 0 value or as
      VIR_DOMAIN_MEMORY_PARAM_UNLIMITED.  Because we chose to store memory
      limits as unsigned long long, we cannot use -1 to represent unlimited.
      It's much easier for us to say that everything greater than
      VIR_DOMAIN_MEMORY_PARAM_UNLIMITED means unlimited and leave 0 as valid
      value despite that it makes no sense to set limit to 0.
      
      Remove unnecessary function virCompareLimitUlong.  The update of test
      is to prevent the 0 to be miss-used as unlimited in future.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1146539Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      cf521fc8
  11. 21 2月, 2015 1 次提交
  12. 17 2月, 2015 1 次提交
  13. 27 1月, 2015 1 次提交
  14. 15 1月, 2015 1 次提交
    • D
      Add support for systemd-machined CreateMachineWithNetwork · 318df5a0
      Daniel P. Berrange 提交于
      systemd-machined introduced a new method CreateMachineWithNetwork
      that obsoletes CreateMachine. It expects to be given a list of
      VETH/TAP device indexes for the host side device(s) associated
      with a container/machine.
      
      This falls back to the old CreateMachine method when the new
      one is not supported.
      318df5a0
  15. 17 12月, 2014 1 次提交
  16. 16 12月, 2014 3 次提交
  17. 15 11月, 2014 1 次提交
  18. 11 11月, 2014 2 次提交
    • W
      qemu: fix domain startup failing with 'strict' mode in numatune · c6e90248
      Wang Rui 提交于
      If the memory mode is specified as 'strict' and with one node, we
      get the following error when starting domain.
      
      error: Unable to write to '$cgroup_path/cpuset.mems': Device or resource busy
      
      XML is configured with numatune as follows:
        <numatune>
          <memory mode='strict' nodeset='0'/>
        </numatune>
      
      It's broken by Commit 411cea63
      which moved qemuSetupCgroupForEmulator() before setting cpuset.mems
      in qemuSetupCgroupPostInit.
      
      Directory '$cgroup_path/emulator/' is created in qemuSetupCgroupForEmulator.
      But '$cgroup_path/emulator/cpuset.mems' it not set and has a default value
      (all nodes, such as 0-1). Then we setup '$cgroup_path/cpuset.mems' to the
      nodemask (in this case it's '0') in qemuSetupCgroupPostInit. It must fail.
      
      This patch makes '$cgroup_path/emulator/cpuset.mems' is set before
      '$cgroup_path/cpuset.mems'. The action is similar with that in
      qemuDomainSetNumaParamsLive.
      Signed-off-by: NWang Rui <moon.wangrui@huawei.com>
      c6e90248
    • W
      qemu: don't setup cpuset.mems if memory mode in numatune is not 'strict' · 38a0f6df
      Wang Rui 提交于
      If the memory mode in numatune is specified as 'preferred' with one node
      (such as nodeset='0'), domain's memory is not all in node 0 absolutely.
      Assumption that node 0 doesn't have enough memory, memory can be allocated
      on node 1 when qemu process startup. Then if we set cpuset.mems to '0',
      it may invoke OOM.
      
      Commit 1a7be8c6 changed the former logic of
      checking memory mode in virDomainNumatuneGetNodeset. This patch adds the
      check as before.
      Signed-off-by: NWang Rui <moon.wangrui@huawei.com>
      38a0f6df
  19. 21 10月, 2014 1 次提交
  20. 02 10月, 2014 1 次提交
    • G
      qemu: use systemd's TerminateMachine to kill all processes · 4882618e
      Guido Günther 提交于
      If we don't properly clean up all processes in the
      machine-<vmname>.scope systemd won't remove the cgroup and subsequent vm
      starts fail with
      
        'CreateMachine: File exists'
      
      Additional processes can e.g. be added via
      
        echo $PID > /sys/fs/cgroup/systemd/machine.slice/machine-${VMNAME}.scope/tasks
      
      but there are other cases like
      
        http://bugs.debian.org/761521
      
      Invoke TerminateMachine to be on the safe side since systemd tracks the
      cgroup anyway. This is a noop if all processes have terminated already.
      4882618e
  21. 29 9月, 2014 1 次提交
  22. 26 9月, 2014 1 次提交
    • D
      Rename tunable event constants · 0778c0be
      Daniel P. Berrange 提交于
      For the new VIR_DOMAIN_EVENT_ID_TUNABLE event we have a bunch of
      constants added
      
         VIR_DOMAIN_EVENT_CPUTUNE_<blah>
         VIR_DOMAIN_EVENT_BLKDEVIOTUNE_<blah>
      
      This naming convention is bad for two reasons
      
        - There is no common prefix unique for the events to both
          relate them, and distinguish them from other event
          constants
      
        - The values associated with the constants were chosen
          to match the names used with virConnectGetAllDomainStats
          so having EVENT in the constant name is not applicable in
          that respect
      
      This patch proposes renaming the constants to
      
          VIR_DOMAIN_TUNABLE_CPU_<blah>
          VIR_DOMAIN_TUNABLE_BLKDEV_<blah>
      
      ie, given them a common VIR_DOMAIN_TUNABLE prefix.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      0778c0be
  23. 24 9月, 2014 1 次提交
  24. 18 9月, 2014 1 次提交
  25. 16 9月, 2014 2 次提交
    • J
      qemu_cgroup: Adjust spacing around incrementor · 500c91c5
      John Ferlan 提交于
      Change "i+1" to "i + 1"
      500c91c5
    • J
      qemu_cgroup: Introduce cgroup functions for IOThreads · 5f6ad32c
      John Ferlan 提交于
      In order to support cpuset setting, introduce qemuSetupCgroupIOThreadsPin
      and qemuSetupCgroupForIOThreads to mimic the existing Vcpu API's.
      
      These will support having an 'iotrhreadpin' element in the 'cpuset' in
      order to pin named IOThreads to specific CPU's. The IOThread pin names
      will follow the IOThread naming scheme starting at 1 (eg "iothread1")
      up through an including the def->iothreads value.
      5f6ad32c
  26. 28 7月, 2014 1 次提交