From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57550) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SvNRR-0007Ls-O7 for qemu-devel@nongnu.org; Sun, 29 Jul 2012 02:57:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SvNRQ-0007hr-O9 for qemu-devel@nongnu.org; Sun, 29 Jul 2012 02:57:29 -0400 Received: from mx1.redhat.com ([209.132.183.28]:7723) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SvNRQ-0007hn-Ep for qemu-devel@nongnu.org; Sun, 29 Jul 2012 02:57:28 -0400 Message-ID: <5014DECE.2050905@redhat.com> Date: Sun, 29 Jul 2012 09:57:18 +0300 From: Orit Wasserman MIME-Version: 1.0 References: <1343227834-5400-1-git-send-email-owasserm@redhat.com> <1343227834-5400-11-git-send-email-owasserm@redhat.com> <5011C77E.7050901@redhat.com> In-Reply-To: <5011C77E.7050901@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 09/11] Add migration accounting for normal and duplicate pages List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: peter.maydell@linaro.org, aliguori@us.ibm.com, quintela@redhat.com, stefanha@gmail.com, qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com, blauwirbel@gmail.com, Petter Svard , Benoit Hudzia , avi@redhat.com, Aidan Shribman , pbonzini@redhat.com, lcapitulino@redhat.com, chegu_vinod@hp.com On 07/27/2012 01:41 AM, Eric Blake wrote: > On 07/25/2012 08:50 AM, Orit Wasserman wrote: >> Signed-off-by: Benoit Hudzia >> Signed-off-by: Petter Svard >> Signed-off-by: Aidan Shribman >> Signed-off-by: Orit Wasserman >> Signed-off-by: Juan Quintela >> --- >> +++ b/qapi-schema.json >> @@ -264,11 +264,15 @@ >> # migration has ended, it returns the total migration >> # time. (since 1.2) >> # >> -# Since: 0.14.0. >> +# @duplicate: #optional, number of duplicate pages (since 1.2) > > I think I was the one that originally asked whether #optional was > appropriate for back-compat reasons when adding to a struct, but Luis > has since corrected me - #optional only makes sense for a return member > that will not appear in all uses of the struct in the current version. > But the number of duplicates is always available (even if it is 0), so > it should not be optional. That is, this line should be: > > # @duplicate: number of duplicate pages (since 1.2) > >> +# >> +# @normal : #optional, number of normal pages (since 1.2) > > Likewise. > >> +# >> +# Since: 0.14.0 >> ## >> { 'type': 'MigrationStats', >> 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' , >> - 'total_time': 'int' } } >> + 'total_time': 'int', '*duplicate': 'int', '*normal': 'int' } } > > and this should be 'duplicate' and 'normal'. > >> +++ b/qmp-commands.hx >> @@ -2099,6 +2099,8 @@ The main json-object contains the following: >> - "transferred": amount transferred (json-int) >> - "remaining": amount remaining (json-int) >> - "total": total (json-int) >> + - "duplicate": number of duplicated pages (json-int) >> + - "normal" : number of normal pages transferred (json-int) >> - "disk": only present if "status" is "active" and it is a block migration, >> it is a json-object with the following disk information (in bytes): >> - "transferred": amount transferred (json-int) >> > > Incomplete if we decide that 'duplicate' and 'normal' are not optional; > we should be updating example 4 and 5 to list the new fields. > I will fix it, Orit