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 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:
>   <memoryBacking>
>     <nosharepages/>
>   </memoryBacking>
> 
> 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
line)

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 :)

> ---
>  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 @@
>                <empty/>
>              </element>
>            </optional>
> +          <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
validation.

ACK with the fixed rng schema.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
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]