qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 7/7] migration: Add dirty_pages_rate to query mi


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 7/7] migration: Add dirty_pages_rate to query migrate output
Date: Mon, 13 Aug 2012 10:49:51 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0

On 08/13/2012 10:04 AM, Juan Quintela wrote:

>>> +# @dirty-pages-rate: number of pages dirtied by second by the
>>> +#        guest. (since 1.2)
>>

>> Since HMP only prints this stat when it is non-zero, should this field
>> be marked optional?  Then again, once you have dirty page tracking, I
>> suspect this would never be zero (or even showing an explicit zero would
>> help detect stalls).
> 
> What is easier for libvirt to have here.
> 
> At the beggining, this value is going to be wrong/cero. I can:
> - not print it until it is != 0
> - print a big enough number )
> - make it optional?  I guess this would alse be more difficult for
>   libvirt.
> - put your good idea here?

I see your point about querying early enough that there is not yet
enough data to have a good estimate.  In that case, either outputting 0
or omitting the field will do the trick.  Libvirt already has to support
older qemu that always omitted the field, and it is a one-liner code
addition in libvirt to say that if the field is omitted, treat it like
'0'.  I'm not even quite sure what libvirt will be able to do with this
number; libvirt made some unfortunate API decisions where migration
statistics are exposed to the user in a hard-coded struct
(virDomainJobInfo), and since we didn't allow for the struct to grow
without breaking ABI, exposing additional information would require a
new libvirt API.  So don't let libvirt hold up the inclusion of this
useful information on the qemu side of things.

Maybe another option would be to return [U]INT_MAX when there is not
enough data to yet provide a valid number, where having a non-zero value
at least lets people know that the stat will be available in a later call.

-- 
Eric Blake   address@hidden    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]