Re: [Qemu-devel] [RFC PATCH RDMA support v4: 08/10] introduce QEMUFileRDMA

2013-03-20 Thread Michael R. Hines
On 03/20/2013 11:20 AM, Paolo Bonzini wrote: Il 19/03/2013 19:40, Paolo Bonzini ha scritto: That however gives me an idea... Instead of the full drain at the end of an iteration, does it make sense to do a "partial" drain at every chunk full, so that you don't have > N bytes pending and the dow

Re: [Qemu-devel] [RFC PATCH RDMA support v4: 08/10] introduce QEMUFileRDMA

2013-03-20 Thread Paolo Bonzini
Il 19/03/2013 19:40, Paolo Bonzini ha scritto: >>> >> That however gives me an idea... Instead of the full drain at the end >>> >> of an iteration, does it make sense to do a "partial" drain at every >>> >> chunk full, so that you don't have > N bytes pending and the downtime is >>> >> correspondi

Re: [Qemu-devel] [RFC PATCH RDMA support v4: 08/10] introduce QEMUFileRDMA

2013-03-19 Thread Paolo Bonzini
Il 19/03/2013 19:27, Michael R. Hines ha scritto: >>> >> That however gives me an idea... Instead of the full drain at the end >> of an iteration, does it make sense to do a "partial" drain at every >> chunk full, so that you don't have > N bytes pending and the downtime is >> correspondingly limi

Re: [Qemu-devel] [RFC PATCH RDMA support v4: 08/10] introduce QEMUFileRDMA

2013-03-19 Thread Michael R. Hines
On 03/19/2013 10:22 AM, Paolo Bonzini wrote: Il 19/03/2013 15:10, Michael R. Hines ha scritto: On 03/19/2013 09:45 AM, Paolo Bonzini wrote: This is because of downtime: You have to drain the queue anyway at the very end, and if you don't drain it in advance after each iteration, then the queue

Re: [Qemu-devel] [RFC PATCH RDMA support v4: 08/10] introduce QEMUFileRDMA

2013-03-19 Thread Paolo Bonzini
Il 19/03/2013 15:10, Michael R. Hines ha scritto: > On 03/19/2013 09:45 AM, Paolo Bonzini wrote: >> This is because of downtime: You have to drain the queue anyway at the >> very end, and if you don't drain it in advance after each iteration, then >> the queue will have lots of bytes in it waiting

Re: [Qemu-devel] [RFC PATCH RDMA support v4: 08/10] introduce QEMUFileRDMA

2013-03-19 Thread Michael R. Hines
On 03/19/2013 09:45 AM, Paolo Bonzini wrote: This is because of downtime: You have to drain the queue anyway at the very end, and if you don't drain it in advance after each iteration, then the queue will have lots of bytes in it waiting for transmission and the Virtual Machine will be stopped fo

Re: [Qemu-devel] [RFC PATCH RDMA support v4: 08/10] introduce QEMUFileRDMA

2013-03-19 Thread Paolo Bonzini
Il 19/03/2013 14:40, Michael R. Hines ha scritto: > On 03/19/2013 09:25 AM, Paolo Bonzini wrote: >> Yes, the drain needs to happen in a few places already: >> >> 1. During save_rdma_page (if the current "chunk" is full of pages) >> Ok, this is internal to RDMA so no problem. >> >>> 2. During the en

Re: [Qemu-devel] [RFC PATCH RDMA support v4: 08/10] introduce QEMUFileRDMA

2013-03-19 Thread Michael R. Hines
On 03/19/2013 09:25 AM, Paolo Bonzini wrote: Yes, the drain needs to happen in a few places already: 1. During save_rdma_page (if the current "chunk" is full of pages) Ok, this is internal to RDMA so no problem. 2. During the end of each iteration (now using qemu_fflush in my current patch) W

Re: [Qemu-devel] [RFC PATCH RDMA support v4: 08/10] introduce QEMUFileRDMA

2013-03-19 Thread Paolo Bonzini
Il 19/03/2013 14:12, Michael R. Hines ha scritto: > On 03/19/2013 05:18 AM, Paolo Bonzini wrote: >> Il 18/03/2013 21:33, Michael R. Hines ha scritto: +int qemu_drain(QEMUFile *f) +{ +return f->ops->drain ? f->ops->drain(f->opaque) : 0; +} Hmm, this is very similar to qe

Re: [Qemu-devel] [RFC PATCH RDMA support v4: 08/10] introduce QEMUFileRDMA

2013-03-19 Thread Michael R. Hines
On 03/19/2013 05:18 AM, Paolo Bonzini wrote: Il 18/03/2013 21:33, Michael R. Hines ha scritto: +int qemu_drain(QEMUFile *f) +{ +return f->ops->drain ? f->ops->drain(f->opaque) : 0; +} Hmm, this is very similar to qemu_fflush, but not quite. :/ Why exactly is this needed? Good idea - I'll r

Re: [Qemu-devel] [RFC PATCH RDMA support v4: 08/10] introduce QEMUFileRDMA

2013-03-19 Thread Paolo Bonzini
Il 18/03/2013 21:33, Michael R. Hines ha scritto: >> >> +int qemu_drain(QEMUFile *f) >> +{ >> +return f->ops->drain ? f->ops->drain(f->opaque) : 0; >> +} >> Hmm, this is very similar to qemu_fflush, but not quite. :/ >> >> Why exactly is this needed? > > Good idea - I'll replace drain with flu

Re: [Qemu-devel] [RFC PATCH RDMA support v4: 08/10] introduce QEMUFileRDMA

2013-03-18 Thread Michael R. Hines
Comments inline - tell me what you think... On 03/18/2013 05:09 AM, Paolo Bonzini wrote: +typedef struct QEMUFileRDMA +{ +void *rdma; This is an RDMAData *. Please avoid using void * as much as possible. Acknowledged - forgot to move this to rdma.c, so it doesn't have to be void anymor

Re: [Qemu-devel] [RFC PATCH RDMA support v4: 08/10] introduce QEMUFileRDMA

2013-03-18 Thread Paolo Bonzini
Il 18/03/2013 04:19, mrhi...@linux.vnet.ibm.com ha scritto: > From: "Michael R. Hines" > > This compiles with and without --enable-rdma. > > Signed-off-by: Michael R. Hines > --- > include/migration/qemu-file.h | 10 +++ > savevm.c | 172 > +