mirror of
https://github.com/libvirt/libvirt.git
synced 2026-10-02 12:20:06 -05:00
Add support for locking domain's memory pages
The following XML configuration can be used to request all domain's
memory pages to be kept locked in host's memory (i.e., domain's memory
pages will not be swapped out):
<memoryBacking>
<locked/>
</memoryBacking>
This commit is contained in:
1 parent
4734f1f53b
commit
555866389c
4 files changed
+33
-19
No files matched your search
+16
-10
@@ -595,22 +595,28 @@
|
||||
<memoryBacking>
|
||||
<hugepages/>
|
||||
<nosharepages/>
|
||||
<locked/>
|
||||
</memoryBacking>
|
||||
...
|
||||
</domain>
|
||||
</pre>
|
||||
|
||||
<p>The optional <code>memoryBacking</code> element may contain several
|
||||
elements that influence how virtual memory pages are backed by host
|
||||
pages.</p>
|
||||
|
||||
<dl>
|
||||
<dt><code>memoryBacking</code></dt>
|
||||
<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>
|
||||
<dt><code>hugepages</code></dt>
|
||||
<dd>This tells the hypervisor that the guest should have its memory
|
||||
allocated using hugepages instead of the normal native page size.</dd>
|
||||
<dt><code>nosharepages</code></dt>
|
||||
<dd>Instructs hypervisor to disable shared pages (memory merge, KSM) for
|
||||
this domain. <span class="since">Since 1.0.6</span></dd>
|
||||
<dt><code>locked</code></dt>
|
||||
<dd>When set and supported by the hypervisor, memory pages belonging
|
||||
to the domain will be locked in host's memory and the host will not
|
||||
be allowed to swap them out.
|
||||
<span class="since">Since 1.0.6</span></dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
@@ -501,6 +501,11 @@
|
||||
<empty/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name="locked">
|
||||
<empty/>
|
||||
</element>
|
||||
</optional>
|
||||
</interleave>
|
||||
</element>
|
||||
</optional>
|
||||
|
||||
Reference in new issue
Block a user