You need to sign in or sign up before continuing.
  1. 06 11月, 2014 1 次提交
  2. 04 11月, 2014 2 次提交
  3. 25 9月, 2014 1 次提交
  4. 20 8月, 2014 1 次提交
    • M
      nodeCapsInitNUMA: Avoid @cpumap leak · f4c87a0c
      Michal Privoznik 提交于
      In case the host has 2 or more NUMA nodes, we fetch CPU map for each
      node. However, we need to free the CPU map in between loops:
      
      ==29513== 96 (72 direct, 24 indirect) bytes in 3 blocks are definitely lost in loss record 951 of 1,264
      ==29513==    at 0x4C2A700: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
      ==29513==    by 0x52AD24B: virAlloc (viralloc.c:144)
      ==29513==    by 0x52AF0E6: virBitmapNew (virbitmap.c:78)
      ==29513==    by 0x52FB720: virNumaGetNodeCPUs (virnuma.c:294)
      ==29513==    by 0x53C700B: nodeCapsInitNUMA (nodeinfo.c:1886)
      ==29513==    by 0x11759708: vboxCapsInit (vbox_common.c:398)
      ==29513==    by 0x11759CC4: vboxConnectOpen (vbox_common.c:514)
      ==29513==    by 0x53C965F: do_open (libvirt.c:1147)
      ==29513==    by 0x53C9EBC: virConnectOpen (libvirt.c:1317)
      ==29513==    by 0x142905: remoteDispatchConnectOpen (remote.c:1215)
      ==29513==    by 0x126ADF: remoteDispatchConnectOpenHelper (remote_dispatch.h:2346)
      ==29513==    by 0x5453D21: virNetServerProgramDispatchCall (virnetserverprogram.c:437)
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      f4c87a0c
  5. 13 8月, 2014 1 次提交
    • E
      maint: improve syntax check for space around = · b50c8603
      Eric Blake 提交于
      Laine Stump noted on IRC that syntax check wasn't flagging his
      typo of 'i= 0'.  This fixes it.
      
      * build-aux/bracket-spacing.pl: Tighten 'space around =' rule.
      * src/storage/storage_backend.c
      (virStorageBackendCreateExecCommand): Fix offenders.
      * src/util/virnuma.c (virNumaGetDistances): Likewise.
      * src/vbox/vbox_tmpl.c (vboxDomainSnapshotDeleteMetadataOnly)
      (vboxNetworkGetXMLDesc): Likewise.
      * src/xenapi/xenapi_driver.c (xenapiDomainLookupByName):
      Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      b50c8603
  6. 22 7月, 2014 1 次提交
    • E
      build: fix build without numactl · 72823b44
      Eric Blake 提交于
      Under ./configure --without-numactl but with numactl-devel installed,
      the build fails with:
      
      ../../src/util/virnuma.c: In function 'virNumaNodeIsAvailable':
      ../../src/util/virnuma.c:407:5: error: implicit declaration of function 'numa_bitmask_isbitset' [-Werror=implicit-function-declaration]
           return numa_bitmask_isbitset(numa_nodes_ptr, node);
           ^
      
      and other failures, all because the configure results for particular
      functions were used without regard to whether libnuma was even being
      linked in.
      
      * src/util/virnuma.c (virNumaGetPages): Fix message typo.
      (virNumaNodeIsAvailable): Correct build when not using numactl.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      72823b44
  7. 17 7月, 2014 4 次提交
  8. 24 6月, 2014 2 次提交
    • M
      virNumaGetPages: Don't fail on huge page-less systems · 2c78a270
      Michal Privoznik 提交于
      If we are running on a system that is not capable of huge pages (e.g.
      because the kernel is not configured that way) we still try to open
      "/sys/kernel/mm/hugepages/" which however does not exist. We should
      be tolerant to this specific use case.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      2c78a270
    • M
      virNumaGetPageInfo: Take huge pages into account · 3499eedd
      Michal Privoznik 提交于
      On the Linux kernel, if huge pages are allocated the size they cut off
      from memory is accounted under the 'MemUsed' in the meminfo file.
      However, we want the sum to be subtracted from 'MemTotal'. This patch
      implements this feature. After this change, we can enable reporting
      of the ordinary system pages in the capability XML:
      
      <capabilities>
      
        <host>
          <uuid>01281cda-f352-cb11-a9db-e905fe22010c</uuid>
          <cpu>
            <arch>x86_64</arch>
            <model>Haswell</model>
            <vendor>Intel</vendor>
            <topology sockets='1' cores='1' threads='1'/>
            <feature/>
            <pages unit='KiB' size='4'/>
            <pages unit='KiB' size='2048'/>
            <pages unit='KiB' size='1048576'/>
          </cpu>
          <power_management/>
          <migration_features/>
          <topology>
            <cells num='4'>
              <cell id='0'>
                <memory unit='KiB'>4048248</memory>
                <pages unit='KiB' size='4'>748382</pages>
                <pages unit='KiB' size='2048'>3</pages>
                <pages unit='KiB' size='1048576'>1</pages>
                <distances/>
                <cpus num='1'>
                  <cpu id='0' socket_id='0' core_id='0' siblings='0'/>
                </cpus>
              </cell>
              ...
            </cells>
          </topology>
        </host>
      </capabilities>
      
      You can see the beautiful thing about this: if you sum up all the
      <pages/> you'll get <memory/>.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      3499eedd
  9. 23 6月, 2014 5 次提交
  10. 19 6月, 2014 2 次提交
    • M
      virnuma: Introduce pages helpers · 35f1095e
      Michal Privoznik 提交于
      For future work we need two functions that fetches total number of
      pages and number of free pages for given NUMA node and page size
      (virNumaGetPageInfo()).
      
      Then we need to learn pages of what sizes are supported on given node
      (virNumaGetPages()).
      
      Note that system page size is disabled at the moment as there's one
      issue connected. If you have a NUMA node with huge pages allocated the
      kernel would return the normal size of memory for that node. It
      basically ignores the fact that huge pages steal size from the system
      memory. Until we resolve this, it's safer to not confuse users and
      hence not report any system pages yet.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      35f1095e
    • M
      virnuma: Introduce virNumaNodeIsAvailable · 356c6f38
      Michal Privoznik 提交于
      Not on all hosts the set of NUMA nodes IDs is continuous. This is
      critical, because our code currently assumes the set doesn't contain
      holes. For instance in nodeGetFreeMemory() we can see the following
      pattern:
      
          if ((max_node = virNumaGetMaxNode()) < 0)
              return 0;
      
          for (n = 0; n <= max_node; n++) {
              ...
          }
      
      while it should be something like this:
      
          if ((max_node = virNumaGetMaxNode()) < 0)
              return 0;
      
          for (n = 0; n <= max_node; n++) {
              if (!virNumaNodeIsAvailable(n))
                  continue;
              ...
          }
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      356c6f38
  11. 04 6月, 2014 3 次提交
  12. 03 6月, 2014 1 次提交
  13. 25 3月, 2014 1 次提交
  14. 18 3月, 2014 1 次提交
  15. 23 1月, 2014 1 次提交
    • O
      util: Correct the NUMA node range checking · ae2860b4
      Osier Yang 提交于
      There are 2 issues here: First we shouldn't add "1" to the return
      value of numa_max_node(), since the semanteme of the error message
      was changed, it's not saying about the number of total NUMA nodes
      anymore.  Second, the value of "bit" is the position of the first
      bit which exceeds either numa_max_node() or NUMA_NUM_NODES, it can
      be any number in the range, so saying "bigger than $bit" is quite
      confused now. For example, assuming there is a NUMA machine which
      has 10 NUMA nodes, and one specifies the "nodeset" as "0,5,88",
      the error message will be like:
      
      Nodeset is out of range, host cannot support NUMA node bigger than 88
      
      It sounds like all NUMA node number less than 88 is fine, but
      actually the maximum NUMA node number the machine supports is 9.
      
      This patch fixes the issues by removing the addition with "1" and
      simplifies the error message as "NUMA node $bit is out of range".
      Also simplifies the comparision in the while loop by getting the
      smaller one of numa_max_node() and NUMA_NUM_NODES up front.
      ae2860b4
  16. 04 11月, 2013 5 次提交
  17. 11 7月, 2013 1 次提交
  18. 24 4月, 2013 1 次提交
  19. 20 3月, 2013 2 次提交