Bug 950968

Summary: Allow enable/disable ksm per VM - libvirt support
Product: Red Hat Enterprise Linux 7 Reporter: Wayne Sun <gsun>
Component: libvirtAssignee: Jiri Denemark <jdenemar>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 7.0CC: acathrow, amit.shah, areis, berrange, dallan, dyuan, ehabkost, honzhang, iheim, juzhang, knoel, lcapitulino, mhusnain, michen, mjenner, mkenneth, mzhan, tburke, virt-maint, ypu
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: libvirt-1.0.6-1.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 769021 Environment:
Last Closed: 2014-06-13 11:34:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 557939, 769021, 953844, 1283895    
Bug Blocks: 580954, 635417, 635419, 655920, 1008500    

Comment 2 Osier Yang 2013-04-22 11:20:48 UTC
Depended on 953844, we have no way to probe the qemu capabilities for the new option properties or new options.

Comment 3 Osier Yang 2013-05-15 03:29:50 UTC
commit 77b54b96611655355936f8024fad588af16610a1
Author: Osier Yang <jyang>
Date:   Tue May 14 13:25:50 2013 +0800

    qemu: New XML to disable memory merge at guest startup
    
    QEMU introduced command line "-mem-merge=on|off" (defaults to on) to
    enable/disable the memory merge (KSM) at guest startup. This exposes
    it by new XML:
      <memoryBacking>
        <nosharepages/>
      </memoryBacking>
    
    The XML tag is same with what we used internally for old RHEL.

Comment 4 Wayne Sun 2013-06-04 09:20:14 UTC
pkgs:
libvirt-1.0.6-1.el7.x86_64
qemu-kvm-1.5.0-2.el7.x86_64
kernel-3.9.0-0.55.el7.x86_64

steps:
1. prepare a domain with following xml info
...
  <memoryBacking>
    <nosharepages/>
  </memoryBacking>
...

2. start domain
# virsh start rhel7
Domain rhel7 started

check qemu process:
# ps aux|grep qemu|grep mem-merge
qemu     16181  111  0.2 1646096 55536 ?       Sl   17:16   0:12 /usr/libexec/qemu-kvm -name rhel7 -S -machine pc-i440fx-1.4,accel=kvm,usb=off,mem-merge=off -m 1024 -realtime mlock=off -smp 4,sockets=4,cores=1,threads=1 -uuid d45afe60-be16-4e88-a6f2-e40cdcea9136 -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/rhel7.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -no-acpi -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive file=/var/lib/libvirt/images/rhel72.img,if=none,id=drive-ide0-0-0,format=raw -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 -netdev tap,fd=26,id=hostnet0,vhost=on,vhostfd=27 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:48:88:34,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -vnc 127.0.0.1:0 -vga cirrus -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5

'mem-merge=off' option is added and domain can start.

Comment 6 Ludek Smid 2014-06-13 11:34:50 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.