qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Qemu live migration code


From: Dr. David Alan Gilbert
Subject: Re: [Qemu-devel] Qemu live migration code
Date: Tue, 13 May 2014 09:05:29 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

* Bechir Bani (address@hidden) wrote:
>  Hi ,
> 
> There is someone who can explain to me the role of two trace points in the
> file* Migration.c *
> 
> The trace points are :
> 
>  *  migrate_pending* : what are the attributes *pending size *and *max* ?

'pending_size' is an estimate of the amount of data left to be transferred
in the iterative part.
'max_size' is an estimate of the amount of data that can be transferred in the
'max_downtime' period
Thus if pending_size < max_size it can stop iterating and transfer the last
part.

>  *  migrate_transferred*: what are the attributes *transferred* ,*
> time_spent* , *bandwidth* and *max_size* ?

Every so often it recalculates bandwidths etc:
   transferred_bytes - actual bytes transferred during migration since the last
              time it did that set of calculations
   time_spent - time since it last did that set of calculations
   bandwidth - transferred_bytes  / time_spent
   max_size = as in the previous trace point.

Dave
   
> 
> 
> Thank you !
> 
> 
> 2014-03-25 6:03 GMT-04:00 Sanidhya Kashyap <address@hidden>:
> 
> >
> >
> >
> > On Tue, Mar 25, 2014 at 2:10 AM, Bechir Bani <address@hidden>wrote:
> >
> >> Hi Sanidhya,
> >>
> >>
> >> Which function in savevm.c can tell me about the stop time ?
> >>
> >>
> > the migration thread function in migration.c file which has function name
> > - qemu_savevm_state_complete will get executed in the stop and copy phase.
> >
> >
> >>
> >> 2014-03-24 13:46 GMT-04:00 Sanidhya Kashyap <address@hidden>:
> >>
> >> savevm.c will tell you about the stop time.
> >>>
> >>> arch_init.c (ram_save_block) will tell about the number of pages
> >>> transferred.
> >>>
> >>>
> >>> On Mon, Mar 24, 2014 at 10:51 PM, Bechir Bani <address@hidden>wrote:
> >>>
> >>>> I have a task to add trace points in the source code of Qemu. The goal
> >>>> is to know the number of pages transferred at each iteration and stop 
> >>>> time
> >>>> of the machine as well.
> >>>>
> >>>>
> >>>> 2014-03-24 12:50 GMT-04:00 Dr. David Alan Gilbert <address@hidden>
> >>>> :
> >>>>
> >>>> * Bechir Bani (address@hidden) wrote:
> >>>>> > Hi,
> >>>>> >
> >>>>> > I want to know the source code of qemu which is responsible for the
> >>>>> > migration of virtual machines, more precisely where the part of the
> >>>>> code
> >>>>> > that describes the stages of memory transfer. is that you can help
> >>>>> me?
> >>>>>
> >>>>> It's split around a few files; memory is mostly in arch_init.c;
> >>>>> It's something like:
> >>>>>
> >>>>>    migration.c       Overall management
> >>>>>       savevm.c
> >>>>>         qemu-file.c    File buffering/bytes on the wire
> >>>>>         vmstate.c      Structured saving of individual devices
> >>>>>         arch_init.c    RAM special code, and a few other things
> >>>>>
> >>>>> What are you trying to do/change?
> >>>>>
> >>>>> Dave
> >>>>>
> >>>>> --
> >>>>> Dr. David Alan Gilbert / address@hidden / Manchester, UK
> >>>>>
> >>>>
> >>>>
> >>>>
> >>>> --
> >>>> *Béchir Bani *
> >>>> ****************************************************************
> >>>> *Ecole Polytechnique de Montréal *
> >>>> ****************************************************************
> >>>> *Laboratoire DORSAL*
> >>>> *****************************************************************
> >>>> *Montréal - Canada*
> >>>>
> >>>
> >>>
> >>
> >>
> >> --
> >> *Béchir Bani *
> >> ****************************************************************
> >> *Ecole Polytechnique de Montréal *
> >> ****************************************************************
> >> *Laboratoire DORSAL*
> >> *****************************************************************
> >> *Montréal - Canada*
> >>
> >
> >
> 
> 
> -- 
> *Béchir Bani *
> ****************************************************************
> *Ecole Polytechnique de Montréal *
> ****************************************************************
> *Laboratoire DORSAL*
> *****************************************************************
> *Montréal - Canada*
--
Dr. David Alan Gilbert / address@hidden / Manchester, UK



reply via email to

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