• M
    qemu: Prefer hugepages over mem source='file' · 992bf863
    Michal Privoznik 提交于
    https://bugzilla.redhat.com/show_bug.cgi?id=1214369
    
    Consider the following XML:
    
      <memoryBacking>
        <hugepages>
          <page size='2048' unit='KiB' nodeset='1'/>
        </hugepages>
        <source type='file'/>
        <access mode='shared'/>
      </memoryBacking>
    
      <numa>
        <cell id='0' cpus='0-3' memory='512000' unit='KiB'/>
        <cell id='1' cpus='4-7' memory='512000' unit='KiB'/>
      </numa>
    
    The following cmd line is generated:
    
      -object
      memory-backend-file,id=ram-node0,mem-path=/var/lib/libvirt/qemu/ram,
      share=yes,size=524288000 -numa node,nodeid=0,cpus=0-3,memdev=ram-node0
      -object
      memory-backend-file,id=ram-node1,mem-path=/var/lib/libvirt/qemu/ram,
      share=yes,size=524288000 -numa node,nodeid=1,cpus=4-7,memdev=ram-node1
    
    This is obviously wrong as for node 1 hugepages should have been
    used. The hugepages configuration is more specific than <source
    type='file'/>.
    Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
    992bf863
qemu_command.c 354.1 KB