1. 13 8月, 2018 39 次提交
  2. 10 8月, 2018 1 次提交
    • P
      conf: Introduce virDomainDefPostParseMemtune · 0a476f15
      Pavel Hrdina 提交于
      Previously we were ignoring "nodeset" attribute for hugepage pages
      if there was no guest NUMA topology configured in the domain XML.
      Commit <fa6bdf6a> partially fixed
      that issue but it introduced a somehow valid regression.
      
      In case that there is no guest NUMA topology configured and the
      "nodeset" attribute is set to "0" it was accepted and was working
      properly even though it was not completely valid XML.
      
      This patch introduces a workaround that it will ignore the nodeset="0"
      only in case that there is no guest NUMA topology in order not to
      hit the validation error.
      
      After this commit the following XML configuration is valid:
      
        <memoryBacking>
          <hugepages>
            <page size='2048' unit='KiB' nodeset='0'/>
          </hugepages>
        </memoryBacking>
      
      but this configuration remains invalid:
      
        <memoryBacking>
          <hugepages>
            <page size='2048' unit='KiB' nodeset='0'/>
            <page size='1048576' unit='KiB'/>
          </hugepages>
        </memoryBacking>
      
      The issue with the second configuration is that it was originally
      working, however changing the order of the <page> elements resolved
      into using different page size for the guest.  The code is written
      in a way that it expect only one page configured and always uses only
      the first page in case that there is no guest NUMA topology configured.
      See qemuBuildMemPathStr() function for details.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1591235Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      0a476f15