qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Qemu live migration code
@ 2014-03-24 15:29 Bechir Bani
  2014-03-24 15:33 ` 陈梁
  2014-03-24 16:50 ` Dr. David Alan Gilbert
  0 siblings, 2 replies; 9+ messages in thread
From: Bechir Bani @ 2014-03-24 15:29 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 546 bytes --]

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?


Thank you !




-- 
*Béchir Bani *
****************************************************************
*Ecole Polytechnique de Montréal *
****************************************************************
*Laboratoire DORSAL*
*****************************************************************
*Montréal - Canada*

[-- Attachment #2: Type: text/html, Size: 1894 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Qemu-devel] Qemu live migration code
  2014-03-24 15:29 [Qemu-devel] Qemu live migration code Bechir Bani
@ 2014-03-24 15:33 ` 陈梁
  2014-03-24 16:50 ` Dr. David Alan Gilbert
  1 sibling, 0 replies; 9+ messages in thread
From: 陈梁 @ 2014-03-24 15:33 UTC (permalink / raw)
  To: Bechir Bani; +Cc: 陈梁, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 646 bytes --]

Hi, the function of migration_thread maybe is your want. 

Best regards.

> 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?
> 
> 
> Thank you !
> 
> 
> 
> 
> -- 
> Béchir Bani 
> **************************************************************
> Ecole Polytechnique de Montréal 
> **************************************************************
> Laboratoire DORSAL
> ***************************************************************
> Montréal - Canada


[-- Attachment #2: Type: text/html, Size: 2162 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Qemu-devel] Qemu live migration code
  2014-03-24 15:29 [Qemu-devel] Qemu live migration code Bechir Bani
  2014-03-24 15:33 ` 陈梁
@ 2014-03-24 16:50 ` Dr. David Alan Gilbert
  2014-03-24 17:21   ` Bechir Bani
  1 sibling, 1 reply; 9+ messages in thread
From: Dr. David Alan Gilbert @ 2014-03-24 16:50 UTC (permalink / raw)
  To: Bechir Bani; +Cc: qemu-devel

* Bechir Bani (bechir.bani@gmail.com) 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 / dgilbert@redhat.com / Manchester, UK

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Qemu-devel] Qemu live migration code
  2014-03-24 16:50 ` Dr. David Alan Gilbert
@ 2014-03-24 17:21   ` Bechir Bani
  2014-03-24 17:46     ` Sanidhya Kashyap
  0 siblings, 1 reply; 9+ messages in thread
From: Bechir Bani @ 2014-03-24 17:21 UTC (permalink / raw)
  To: Dr. David Alan Gilbert, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1325 bytes --]

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 <dgilbert@redhat.com>:

> * Bechir Bani (bechir.bani@gmail.com) 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 / dgilbert@redhat.com / Manchester, UK
>



-- 
*Béchir Bani *
****************************************************************
*Ecole Polytechnique de Montréal *
****************************************************************
*Laboratoire DORSAL*
*****************************************************************
*Montréal - Canada*

[-- Attachment #2: Type: text/html, Size: 1997 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Qemu-devel] Qemu live migration code
  2014-03-24 17:21   ` Bechir Bani
@ 2014-03-24 17:46     ` Sanidhya Kashyap
  2014-03-24 20:40       ` Bechir Bani
  0 siblings, 1 reply; 9+ messages in thread
From: Sanidhya Kashyap @ 2014-03-24 17:46 UTC (permalink / raw)
  To: Bechir Bani; +Cc: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1590 bytes --]

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 <bechir.bani@gmail.com> 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 <dgilbert@redhat.com>:
>
> * Bechir Bani (bechir.bani@gmail.com) 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 / dgilbert@redhat.com / Manchester, UK
>>
>
>
>
> --
> *Béchir Bani *
> ****************************************************************
> *Ecole Polytechnique de Montréal *
> ****************************************************************
> *Laboratoire DORSAL*
> *****************************************************************
> *Montréal - Canada*
>

[-- Attachment #2: Type: text/html, Size: 2645 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Qemu-devel] Qemu live migration code
  2014-03-24 17:46     ` Sanidhya Kashyap
@ 2014-03-24 20:40       ` Bechir Bani
  2014-03-25 10:03         ` Sanidhya Kashyap
  0 siblings, 1 reply; 9+ messages in thread
From: Bechir Bani @ 2014-03-24 20:40 UTC (permalink / raw)
  To: Sanidhya Kashyap, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 2116 bytes --]

Hi Sanidhya,


Which function in savevm.c can tell me about the stop time ?


2014-03-24 13:46 GMT-04:00 Sanidhya Kashyap <sanidhya.iiith@gmail.com>:

> 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 <bechir.bani@gmail.com>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 <dgilbert@redhat.com>:
>>
>> * Bechir Bani (bechir.bani@gmail.com) 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 / dgilbert@redhat.com / 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*

[-- Attachment #2: Type: text/html, Size: 3679 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Qemu-devel] Qemu live migration code
  2014-03-24 20:40       ` Bechir Bani
@ 2014-03-25 10:03         ` Sanidhya Kashyap
  2014-05-12 16:03           ` Bechir Bani
  0 siblings, 1 reply; 9+ messages in thread
From: Sanidhya Kashyap @ 2014-03-25 10:03 UTC (permalink / raw)
  To: Bechir Bani; +Cc: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 2436 bytes --]

On Tue, Mar 25, 2014 at 2:10 AM, Bechir Bani <bechir.bani@gmail.com> 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 <sanidhya.iiith@gmail.com>:
>
> 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 <bechir.bani@gmail.com>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 <dgilbert@redhat.com>:
>>>
>>> * Bechir Bani (bechir.bani@gmail.com) 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 / dgilbert@redhat.com / 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*
>

[-- Attachment #2: Type: text/html, Size: 4467 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Qemu-devel] Qemu live migration code
  2014-03-25 10:03         ` Sanidhya Kashyap
@ 2014-05-12 16:03           ` Bechir Bani
  2014-05-13  8:05             ` Dr. David Alan Gilbert
  0 siblings, 1 reply; 9+ messages in thread
From: Bechir Bani @ 2014-05-12 16:03 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 3276 bytes --]

 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* ?

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


Thank you !


2014-03-25 6:03 GMT-04:00 Sanidhya Kashyap <sanidhya.iiith@gmail.com>:

>
>
>
> On Tue, Mar 25, 2014 at 2:10 AM, Bechir Bani <bechir.bani@gmail.com>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 <sanidhya.iiith@gmail.com>:
>>
>> 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 <bechir.bani@gmail.com>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 <dgilbert@redhat.com>
>>>> :
>>>>
>>>> * Bechir Bani (bechir.bani@gmail.com) 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 / dgilbert@redhat.com / 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*

[-- Attachment #2: Type: text/html, Size: 6080 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Qemu-devel] Qemu live migration code
  2014-05-12 16:03           ` Bechir Bani
@ 2014-05-13  8:05             ` Dr. David Alan Gilbert
  0 siblings, 0 replies; 9+ messages in thread
From: Dr. David Alan Gilbert @ 2014-05-13  8:05 UTC (permalink / raw)
  To: Bechir Bani; +Cc: qemu-devel

* Bechir Bani (bechir.bani@gmail.com) 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 <sanidhya.iiith@gmail.com>:
> 
> >
> >
> >
> > On Tue, Mar 25, 2014 at 2:10 AM, Bechir Bani <bechir.bani@gmail.com>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 <sanidhya.iiith@gmail.com>:
> >>
> >> 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 <bechir.bani@gmail.com>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 <dgilbert@redhat.com>
> >>>> :
> >>>>
> >>>> * Bechir Bani (bechir.bani@gmail.com) 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 / dgilbert@redhat.com / 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 / dgilbert@redhat.com / Manchester, UK

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-05-13  8:05 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-24 15:29 [Qemu-devel] Qemu live migration code Bechir Bani
2014-03-24 15:33 ` 陈梁
2014-03-24 16:50 ` Dr. David Alan Gilbert
2014-03-24 17:21   ` Bechir Bani
2014-03-24 17:46     ` Sanidhya Kashyap
2014-03-24 20:40       ` Bechir Bani
2014-03-25 10:03         ` Sanidhya Kashyap
2014-05-12 16:03           ` Bechir Bani
2014-05-13  8:05             ` Dr. David Alan Gilbert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).