From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36203) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wk7iY-0000TU-26 for qemu-devel@nongnu.org; Tue, 13 May 2014 04:05:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wk7iR-0003b9-MA for qemu-devel@nongnu.org; Tue, 13 May 2014 04:05:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50320) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wk7iR-0003b3-7B for qemu-devel@nongnu.org; Tue, 13 May 2014 04:05:35 -0400 Date: Tue, 13 May 2014 09:05:29 +0100 From: "Dr. David Alan Gilbert" Message-ID: <20140513080528.GB2566@work-vm> References: <20140324165001.GG3829@work-vm> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: Subject: Re: [Qemu-devel] Qemu live migration code List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Bechir Bani Cc: qemu-devel@nongnu.org * Bechir Bani (bechir.bani@gmail.com) wrote: > Hi , >=20 > There is someone who can explain to me the role of two trace points in the > file* Migration.c * >=20 > The trace points are : >=20 > * 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 =3D as in the previous trace point. Dave =20 >=20 >=20 > Thank you ! >=20 >=20 > 2014-03-25 6:03 GMT-04:00 Sanidhya Kashyap : >=20 > > > > > > > > On Tue, Mar 25, 2014 at 2:10 AM, Bechir Bani wro= te: > > > >> 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 na= me > > - qemu_savevm_state_complete will get executed in the stop and copy pha= se. > > > > > >> > >> 2014-03-24 13:46 GMT-04:00 Sanidhya Kashyap : > >> > >> 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 = wrote: > >>> > >>>> I have a task to add trace points in the source code of Qemu. The go= al > >>>> is to know the number of pages transferred at each iteration and sto= p time > >>>> of the machine as well. > >>>> > >>>> > >>>> 2014-03-24 12:50 GMT-04:00 Dr. David Alan Gilbert > >>>> : > >>>> > >>>> * Bechir Bani (bechir.bani@gmail.com) wrote: > >>>>> > Hi, > >>>>> > > >>>>> > I want to know the source code of qemu which is responsible for t= he > >>>>> > migration of virtual machines, more precisely where the part of t= he > >>>>> 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=E9chir Bani * > >>>> **************************************************************** > >>>> *Ecole Polytechnique de Montr=E9al * > >>>> **************************************************************** > >>>> *Laboratoire DORSAL* > >>>> ***************************************************************** > >>>> *Montr=E9al - Canada* > >>>> > >>> > >>> > >> > >> > >> -- > >> *B=E9chir Bani * > >> **************************************************************** > >> *Ecole Polytechnique de Montr=E9al * > >> **************************************************************** > >> *Laboratoire DORSAL* > >> ***************************************************************** > >> *Montr=E9al - Canada* > >> > > > > >=20 >=20 > --=20 > *B=E9chir Bani * > **************************************************************** > *Ecole Polytechnique de Montr=E9al * > **************************************************************** > *Laboratoire DORSAL* > ***************************************************************** > *Montr=E9al - Canada* -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK