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

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

On 04/17/2013 08:54 AM, Eric Blake wrote:
> On 04/17/2013 08:22 AM, 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.
> Good - that means that RHEL 6 (and any other downstream distro that was
> already borrowing the RHEL extension) will not break when rebasing to
> pick up this change from upstream in place of their downstream extension
> (RHEL will actually want to add a followup patch on top of this that
> _also_ tries the older -redhat-disable-KSM downstream spelling of the
> option, but that's a problem for RHEL and not this list).

>> +    if (strstr(help, "-mem-merge"))
>> +        virQEMUCapsSet(qemuCaps, QEMU_CAPS_MEM_MERGE);
> This would only scrape the existence of -mem-merge in qemu 1.2 and
> earlier, since we don't read -help in 1.3 and later.  But qemu 1.2
> doesn't have -mem-merge, so this bit will never get set.  You need to
> instead populate the new capability based on a QMP probe, not string
> scraping.  But I don't know offhand what that probe would be; you may
> need to ask on the qemu list.

And we have a winner.  We are getting query-command-line-options for
qemu 1.5, and it looks easy enough that distros may be able to backport
it into earlier qemu (again, I'll leave it up to Red Hat internal lists
on whether it will be backported to RHEL).


> Looking forward to v2.

Do you need help writing the src/qemu/qemu_monitor_json.c changes needed
to utilize the new query-command-line-options QMP command, since I kind
of spearheaded the design review on the qemu list?

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

Attachment: signature.asc
Description: OpenPGP digital signature

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