
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 @@ ... <memoryBacking> <hugepages/> + <nosharepages/> </memoryBacking> ... </domain> @@ -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: