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.
This commit is contained in:
Osier Yang
2013-05-14 13:25:50 +08:00
parent d12bbd6a7d
commit 77b54b9661
10 changed files with 98 additions and 15 deletions

View File

@@ -561,6 +561,7 @@
...
&lt;memoryBacking&gt;
&lt;hugepages/&gt;
&lt;nosharepages/&gt;
&lt;/memoryBacking&gt;
...
&lt;/domain&gt;
@@ -568,10 +569,15 @@
<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>
(<span class="since">since 1.0.6</span>) tells the hypervisor
that share pages (memory merge, KSM) should be disabled on guest
startup.
</dd>
</dl>

View File

@@ -490,11 +490,18 @@
</optional>
<optional>
<element name="memoryBacking">
<optional>
<element name="hugepages">
<empty/>
</element>
</optional>
<interleave>
<optional>
<element name="hugepages">
<empty/>
</element>
</optional>
<optional>
<element name="nosharepages">
<empty/>
</element>
</optional>
</interleave>
</element>
</optional>