Hide Forgot
RFC series has been posted upstream: http://lists.gnu.org/archive/html/qemu-devel/2012-06/msg04206.html Discussion is going on, but there's general agreement on the feature. Except for the QMP command, which we've decided to drop because of lack of use-cases.
Posted v5 a few days ago: http://lists.gnu.org/archive/html/qemu-devel/2012-09/msg00547.html This is very likely to be the final version. It's also important to note that the QMP command from the RFC series (comment 4) has been dropped. We're only going to have command-line support for this (-machine mem-merge=on|off).
This has finally been merged upstream (commit 8490fc78).
Verify this bug with qemu-kvm-1.5.3-10.el7.x86_64 and 3.10.0-37.el7.x86_64 steps: Test Scenario-1 In host 1.echo 1 > /sys/kernel/mm/ksm/run 2.echo 50 > /sys/kernel/mm/ksm/sleep_millisecs 3.echo 5000 > /sys/kernel/mm/ksm/pages_to_scan 4.Boot two RHEL7.0 guests with "-machine mem-merge=on" In guest 1.swapoff -a(disable swap) 2.mount -f tmpfs none /mnt 3. dd if=/dev/zero of=/mnt/zero result: This pages_sharing continues to rise(1444~1348592) cat /sys/kernel/mm/ksm/pages_sharing 1348592 Test Scenario-2 Use the same test steps as Scenario1. If booting two guests with -machine mem-merge=off. result: This pages_sharing is constant(no change) cat /sys/kernel/mm/ksm/pages_sharing 1444 Test scanrio-3 Booting the first guest with -machine mem-merge=off Booting the second guest with -machine mem-merge=on result: This pages_sharing is constant(no change) after booting the first guest and run dd command line in guest. cat /sys/kernel/mm/ksm/pages_sharing 1444 This pages_sharing continues to rise(1444~59363) when booting the second guest. cat /sys/kernel/mm/ksm/pages_sharing 59363 Base on test result above, qemu-kvm option "-machine mem-merge=on/off" can enable/disable ksm per guest. So this bug is fixed.
According to comment7, set this issue as verified.
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.