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

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

On 15/05/13 06:29, Eric Blake wrote:
On 05/13/2013 11:25 PM, 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:

The XML tag is same with what we used internally for old RHEL.
I checked the .srpm for RHEL 6.4, and concur that your patches will
match (ie. we're being nice to anyone trying to rebase to a newer
version of libvirt in RHEL while still maintaining XML compatibility -
although RHEL will still have to do some downstream-only patching to tie
the new option to the RHEL-only -redhat-disable-KSM alternative command

Your design also matches what we did for <hugepages/>.  If we didn't
have back-compat to worry about, I would have suggested <memoryBacking
sharepages='no'/>, but it's too late to bikeshed now :)

Yes, it was my fault, though the qemu enables it by default, so
it's not that bad, anyway, it's too late to change, :/

  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
+++ b/docs/schemas/domaincommon.rng
@@ -495,6 +495,11 @@
+          <optional>
+            <element name="nosharepages">
+              <empty/>
+            </element>
+          </optional>
Now that there are two elements, you need an <interleave> surrounding
them.  Otherwise, my attempt to write
<memoryBacking><nosharepages/><hugepages/></memoryBacking> will fail

ACK with the fixed rng schema.

Pushed with <interleave> added, together with 1/2 ( I think two ACKs
in turn are enough, :)). Thanks.

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