Bug 1622455 - Set source type in memorybacking as file do not work on non-numa guest which do not use hugepage
Summary: Set source type in memorybacking as file do not work on non-numa guest which ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: libvirt
Version: 8.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: Michal Privoznik
QA Contact: Luyao Huang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-08-27 08:55 UTC by yalzhang@redhat.com
Modified: 2020-11-30 07:15 UTC (History)
7 users (show)

Fixed In Version: libvirt-5.0.0-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-11 22:33:09 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description yalzhang@redhat.com 2018-08-27 08:55:51 UTC
Description of problem:
Set source type in memorybacking as file do not work on non-numa guest which do not use hugepage memorybacking

Version-Release number of selected component (if applicable):
# rpm -q libvirt qemu-kvm-rhev
libvirt-4.5.0-7.el7.x86_64
qemu-kvm-rhev-2.12.0-11.el7.x86_64


How reproducible:
100%

Steps to Reproduce:
1.  prepare a vm with below settings(non-numa guest with source type is file in memoryBacking): 
# virsh dumpxml domain
...
<memory unit='KiB'>1024000</memory>
  <currentMemory unit='KiB'>1024000</currentMemory>
  <memoryBacking>
    <source type='file'/>
  </memoryBacking>
...
<cpu/>
...

# ps aux | grep domain
qemu      2122  114  0.7 1930392 57068 ?       Sl   16:36   0:05 /usr/libexec/qemu-kvm -name guest=domain,debug-threads=on -S -object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-31-domain/master-key.aes -machine pc-i440fx-rhel7.6.0,accel=kvm,usb=off,vmport=off,dump-guest-core=off -m 1000 -realtime mlock=off -smp 8,sockets=8,cores=1,threads=1 -uuid a88c5f12-01e1-4602-b9da-9ec7d7d700a3 -no-user-config -nodefaults -chardev socket,id=charmonitor,fd=26,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc,driftfix=slew -global kvm-pit.lost_tick_policy=delay -no-hpet......

# ps aux | grep domain | grep path ====> no output, there is no 'mem-path=...' in qemu command line

2. If we add numa setting into <cpu/> part, it works
# virsh dumpxml domain
...
<memory unit='KiB'>1024000</memory>
  <currentMemory unit='KiB'>1024000</currentMemory>
  <memoryBacking>
    <source type='file'/>
  </memoryBacking>
  <cpu>
    <numa>
      <cell id='0' cpus='0-7' memory='1024000' unit='KiB'/>
    </numa>
  </cpu>
...
# ps aux | grep domain | grep path
qemu     10632  131  0.7 1930396 58028 ?       Sl   16:39   0:02 /usr/libexec/qemu-kvm -name guest=domain,debug-threads=on -S -object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-32-domain/master-key.aes -machine pc-i440fx-rhel7.6.0,accel=kvm,usb=off,vmport=off,dump-guest-core=off -m 1000 -realtime mlock=off -smp 8,sockets=8,cores=1,threads=1 -object memory-backend-file,id=ram-node0,mem-path=/var/lib/libvirt/qemu/ram/libvirt/qemu/32-domain/ram-node0,size=1048576000 -numa node,nodeid=0,cpus=0-7,memdev=ram-node0 -uuid a88c5f12-01e1-4602-b9da-9ec7d7d700a3 -no-user-config -nodefaults -chardev socket,id=charmonitor,fd=26,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc,driftfix=slew -global kvm-pit.lost_tick_policy=delay -no-hpet......


Actual results:
Set source type in memorybacking as file do not work on non-numa guest which do not use hugepage.

Expected results:
There should be "mem-path=..." in step 1 qemu cmd line.

Additional info:

Comment 2 Michal Privoznik 2018-08-30 12:02:20 UTC
Patch posted upstream:

https://www.redhat.com/archives/libvir-list/2018-August/msg01871.html

Comment 6 Luyao Huang 2019-07-10 02:25:48 UTC
Verify this bug with libvirt-5.0.0-11.module+el8.0.1+3459+e357ef2f.x86_64:

1. prepare a guest with file source memory backend and without numa settings

  <memoryBacking>
    <source type='file'/>
  </memoryBacking>

2. start guest:

# virsh start  vm1
Domain vm1 started

3. check qemu command line and verify there is mempath:

# ps aux|grep qemu
... -m 1000 -mem-prealloc -mem-path /var/lib/libvirt/qemu/ram/libvirt/qemu/1-vm1/ram

Comment 7 Jeff Nelson 2020-03-11 22:33:09 UTC
This was verified and shipped long ago. Closing the bug report.


Note You need to log in before you can comment on or make changes to this bug.