1. 10 4月, 2015 22 次提交
  2. 09 4月, 2015 12 次提交
  3. 08 4月, 2015 6 次提交
    • M
      virLXCControllerSetupResourceLimits: Call virNuma*() iff needed · 36256688
      Michal Privoznik 提交于
      Like we are doing in qemu driver (ea576ee5), lets call
      virNumaSetupMemoryPolicy() only if really needed. Problem is, if
      we numa_set_membind() child, there's no way to change it from the
      daemon afterwards. So any later attempts to change the pinning
      will fail. But in very weird way - CGroups will be set, but due
      to membind child will not allocate memory from any other node.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      36256688
    • 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
    • D
      vbox: Implement virDomainSendKey · 306a242d
      Dawid Zamirski 提交于
      Since the holdtime is not supported by VBOX SDK, it's being simulated
      by sleeping before sending the key-up codes. The key-up codes are
      auto-generated based on XT codeset rules (adding of 0x80 to key-down)
      which results in the same behavior as for QEMU implementation.
      306a242d
    • D
      vbox: Register IKeyboard with the unified API. · 445733f3
      Dawid Zamirski 提交于
      The IKeyboard COM object is needed to implement virDomainSendKey and is
      available in all supported VBOX versions.
      445733f3
    • M
      qemuProcessHook: Call virNuma*() only when needed · ea576ee5
      Michal Privoznik 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1198645
      
      Once upon a time, there was a little domain. And the domain was pinned
      onto a NUMA node and hasn't fully allocated its memory:
      
        <memory unit='KiB'>2355200</memory>
        <currentMemory unit='KiB'>1048576</currentMemory>
      
        <numatune>
          <memory mode='strict' nodeset='0'/>
        </numatune>
      
      Oh little me, said the domain, what will I do with so little memory.
      If I only had a few megabytes more. But the old admin noticed the
      whimpering, barely audible to untrained human ear. And good admin he
      was, he gave the domain yet more memory. But the old NUMA topology
      witch forbade to allocate more memory on the node zero. So he
      decided to allocate it on a different node:
      
      virsh # numatune little_domain --nodeset 0-1
      
      virsh # setmem little_domain 2355200
      
      The little domain was happy. For a while. Until bad, sharp teeth
      shaped creature came. Every process in the system was afraid of him.
      The OOM Killer they called him. Oh no, he's after the little domain.
      There's no escape.
      
      Do you kids know why? Because when the little domain was born, her
      father, Libvirt, called numa_set_membind(). So even if the admin
      allowed her to allocate memory from other nodes in the cgroups, the
      membind() forbid it.
      
      So what's the lesson? Libvirt should rely on cgroups, whenever
      possible and use numa_set_membind() as the last ditch effort.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      ea576ee5
    • M
      vircgroup: Introduce virCgroupControllerAvailable · d65acbde
      Michal Privoznik 提交于
      This new internal API checks if given CGroup controller is
      available.  It is going to be needed later when we need to make a
      decision whether pin domain memory onto NUMA nodes using cpuset
      CGroup controller or using numa_set_membind().
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      d65acbde