1. 26 6月, 2015 12 次提交
    • N
      vz: add memory statistics · bb7d275d
      Nikolay Shirokovskiy 提交于
      Implemented counters:
       VIR_DOMAIN_MEMORY_STAT_SWAP_IN
       VIR_DOMAIN_MEMORY_STAT_SWAP_OUT
       VIR_DOMAIN_MEMORY_STAT_MINOR_FAULT
       VIR_DOMAIN_MEMORY_STAT_MAJOR_FAULT
       VIR_DOMAIN_MEMORY_STAT_AVAILABLE
       VIR_DOMAIN_MEMORY_STAT_ACTUAL_BALLOON
       VIR_DOMAIN_MEMORY_STAT_UNUSED
      
      Comments.
      
      1. Use vzDomObjFromDomainRef/virDomainObjEndAPI pair to get domain
      object as we use prlsdkGetStatsParam. See previous statistics
      comments.
      
      2. Balloon statistics is not applicable to containers. Fault
      statistics for containers not provided in PCS6 yet.
      Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
      bb7d275d
    • N
      vz: add vcpu statistics · b2f73ee2
      Nikolay Shirokovskiy 提交于
      Comments.
      
      Replace vzDomObjFromDomain/virObjectUnlock pair
      to vzDomObjFromDomainRef/virDomainObjEndAPI as we
      use prlsdkGetStatsParam. See previous statistics
      comments.
      Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
      b2f73ee2
    • N
      vz: cleanup, make in par net device lookup functions · b6c11c39
      Nikolay Shirokovskiy 提交于
      Make net device lookup by mac return sdk handle
      instead of quite ephemeral enumeration index. After
      this change there is no need anymore in special
      function of removing device by enumeration index.
      Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
      b6c11c39
    • N
      vz: add net dev statistiscs · b249069d
      Nikolay Shirokovskiy 提交于
      Populate counters SDK currenly supports:
       rx_bytes
       rx_packets
       tx_bytes
       tx_packets
      
      Comments.
      
      Use vzDomObjFromDomainRef/virDomainObjEndAPI pair to get domain
      object as we use prlsdkGetStatsParam that can release domain
      object lock and thus we need a reference in case domain
      is deleated meanwhile.
      Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
      b249069d
    • M
      vz_utils: Reformat · c3c16e69
      Michal Privoznik 提交于
      Honour our formatting style. Adjust indentation so it matches the
      rest of our code.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      c3c16e69
    • M
      vz_storage: Reformat · 2bdcbb4e
      Michal Privoznik 提交于
      Honour our formatting style. Adjust indentation so it matches the
      rest of our code.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      2bdcbb4e
    • M
      vz_sdk: Reformat · dc1b0345
      Michal Privoznik 提交于
      Honour our formatting style. Adjust indentation so it matches the
      rest of our code.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      dc1b0345
    • M
      vz_network: Reformat · a35d2ce0
      Michal Privoznik 提交于
      Honour our formatting style. Adjust indentation so it matches the
      rest of our code.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      a35d2ce0
    • M
      vz_driver: Reformat · ed025db7
      Michal Privoznik 提交于
      Honour our formatting style. Adjust indentation so it matches the
      rest of our code.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      ed025db7
    • M
      qemuBuildMemoryBackendStr: Honour passed @pagesize · 70d75ffc
      Michal Privoznik 提交于
      So far the argument has not much meaning and was practically ignored.
      This is not good since when doing memory hotplug, the size of desired
      hugepage backing is passed in that argument. Taking closer look at the
      tests I'm fixing reveals the bug. For instance, while the following is
      in the test:
      
          <memory model='dimm'>
            <source>
              <nodemask>1-3</nodemask>
              <pagesize unit='KiB'>4096</pagesize>
            </source>
            <target>
              <size unit='KiB'>524287</size>
              <node>0</node>
            </target>
            <address type='dimm' slot='0' base='0x100000000'/>
          </memory>
      
      the generated commandline corresponding to this XML was:
      
          -object memory-backend-ram,id=memdimm0,size=536870912,\
          host-nodes=1-3,policy=bind
      
      Have you noticed? Yes, memory-backend-ram! Nothing can be further away
      from the right answer. The hugepage backing is requested in the XML
      and we happily ignore it. This is just not right. It's
      memory-backend-file which should have been used:
      
          -object memory-backend-file,id=memdimm0,prealloc=yes,\
          mem-path=/dev/hugepages4M/libvirt/qemu,size=536870912,\
          host-nodes=1-3,policy=bind
      
      The problem is, that @pagesize passed to qemuBuildMemoryBackendStr
      (where this part of commandline is built) was ignored. The hugepage to
      back memory was searched only and only by NUMA nodes pinning. This
      works only for regular guest NUMA nodes.
      
      Then, I'm changing the hugepages size in the test XMLs too. This is
      simply because in the test suite we create dummy mount points just for
      2M and 1G hugepages. And in the test 4M was requested. I'm sticking to
      2M, but 1G should just work too.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      70d75ffc
    • M
      qemuBuildMemoryBackendStr: Fix hugepages lookup process · f8e9deb1
      Michal Privoznik 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1196644
      
      This function constructs the backend (host facing) part of the
      memory device.  At the beginning, the configured hugepages are
      searched to find the best match for given guest NUMA node.
      Configured hugepages can have a @nodeset attribute to specify on
      which guest NUMA nodes should be the hugepages backing used.
      There is, however, one 'corner case'. Users may just tell 'use
      hugepages to back all the nodes'. In other words:
      
        <memoryBacking>
          <hugepages/>
        </memoryBacking>
      
        <cpu>
          <numa>
            <cell id='0' cpus='0-1' memory='1024000' unit='KiB'/>
          </numa>
        </cpu>
      
      Our code fails in this case. Well, since there's no @nodeset (nor
      any <page/> child element to <hugepages/>) we fail to lookup the
      default hugepage size to use.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      f8e9deb1
    • L
      conf: Format scheduler priority when it is zero · 786539d6
      Luyao Huang 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1235116
      
      According to our XML definition, zero is as valid as any other value.
      Mainly because it should be kernel-agnostic.
      Signed-off-by: NLuyao Huang <lhuang@redhat.com>
      786539d6
  2. 25 6月, 2015 23 次提交
  3. 24 6月, 2015 5 次提交