Re: [PATCH 2/2] qemu: New XML to disable memory merge at guest startup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 14/05/13 13:25, Osier Yang wrote:
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.
---
  docs/formatdomain.html.in                          | 13 ++++++---
  docs/schemas/domaincommon.rng                      |  5 ++++
  src/conf/domain_conf.c                             | 20 +++++++++-----
  src/conf/domain_conf.h                             |  1 +
  src/qemu/qemu_command.c                            | 22 +++++++++++++++
  tests/qemuargv2xmltest.c                           |  2 ++
  .../qemuxml2argv-nosharepages.args                 |  4 +++
  .../qemuxml2argvdata/qemuxml2argv-nosharepages.xml | 31 ++++++++++++++++++++++
  tests/qemuxml2argvtest.c                           |  1 +
  tests/qemuxml2xmltest.c                            |  1 +
  10 files changed, 90 insertions(+), 10 deletions(-)
  create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-nosharepages.args
  create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-nosharepages.xml

diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 9ade507..3a6c18f 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -561,6 +561,7 @@
    ...
    &lt;memoryBacking&gt;
      &lt;hugepages/&gt;
+    &lt;nosharepages/&gt;
    &lt;/memoryBacking&gt;
    ...
  &lt;/domain&gt;
@@ -568,10 +569,14 @@
<dl>
        <dt><code>memoryBacking</code></dt>
-      <dd>The optional <code>memoryBacking</code> element, may have an
-        <code>hugepages</code> element set within it. This tells the
-        hypervisor that the guest should have its memory allocated using
-        hugepages instead of the normal native page size.</dd>
+      <dd>The optional <code>memoryBacking</code> element has two
+        optional elements. The element <code>hugepages</code> tells
+        the hypervisor that the guest should have its memory allocated
+        using hugepages instead of the normal native page size. And the
+        optional element <code>nosharepages</code> tells the hypervisor
+        that share pages (memory merge, KSM) should be disabled on guest
+        startup.
+      </dd>
      </dl>
With the attached diff squashed in:
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 3a6c18f..df772b5 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -573,7 +573,8 @@
         optional elements. The element <code>hugepages</code> tells
         the hypervisor that the guest should have its memory allocated
         using hugepages instead of the normal native page size. And the
-        optional element <code>nosharepages</code> tells the hypervisor
+        optional element <code>nosharepages</code>
+        (<span class="since">since 1.0.6</span>) tells the hypervisor
         that share pages (memory merge, KSM) should be disabled on guest
         startup.
       </dd>
--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]