Re: [Qemu-devel] [RFC 10/12] Add qemu_put_buffer_no_copy

2013-03-25 Thread Paolo Bonzini
> Right, the header's not used - but, are we certain that > put_buffer_copy() will *always* be used for RAM in the future? I think you should not make any assumption and proceed as if this series didn't exist. Paolo

Re: [Qemu-devel] [RFC 10/12] Add qemu_put_buffer_no_copy

2013-03-25 Thread Michael R. Hines
u-devel@nongnu.org, pbonz...@redhat.com, m...@redhat.com, "chegu vinod" , quint...@redhat.com Inviato: Sabato, 23 marzo 2013 17:27:49 Oggetto: Re: [Qemu-devel] [RFC 10/12] Add qemu_put_buffer_no_copy Can you add a "flag" or something to indicate that the iov pointer belongs to RAM a

Re: [Qemu-devel] [RFC 10/12] Add qemu_put_buffer_no_copy

2013-03-25 Thread Paolo Bonzini
- Messaggio originale - > Da: "Michael R. Hines" > A: "Orit Wasserman" > Cc: qemu-devel@nongnu.org, pbonz...@redhat.com, m...@redhat.com, "chegu > vinod" , > quint...@redhat.com > Inviato: Sabato, 23 marzo 2013 17:2

Re: [Qemu-devel] [RFC 10/12] Add qemu_put_buffer_no_copy

2013-03-25 Thread Orit Wasserman
On 03/23/2013 06:27 PM, Michael R. Hines wrote: > Can you add a "flag" or something to indicate that the iov pointer belongs to > RAM and not to device state? > > That way, I could re-use this code for RDMA - if I see this flag, I will know > to send to RDMA. This function is called only for

Re: [Qemu-devel] [RFC 10/12] Add qemu_put_buffer_no_copy

2013-03-23 Thread Michael R. Hines
Can you add a "flag" or something to indicate that the iov pointer belongs to RAM and not to device state? That way, I could re-use this code for RDMA - if I see this flag, I will know to send to RDMA. - Michael On 03/21/2013 05:09 AM, Orit Wasserman wrote: This allow us to add a buffe

Re: [Qemu-devel] [RFC 10/12] Add qemu_put_buffer_no_copy

2013-03-21 Thread Paolo Bonzini
Il 21/03/2013 10:09, Orit Wasserman ha scritto: > +f->iov[f->iovcnt].iov_base = (uint8_t *)buf; > +f->iov[f->iovcnt++].iov_len = size; > + > +f->is_write = 1; > +f->bytes_xfer += size; > + > +if (f->buf_index >= IO_BUF_SIZE || f->iovcnt >= MAX_IOV_SIZE) { > +qemu_fflush(

[Qemu-devel] [RFC 10/12] Add qemu_put_buffer_no_copy

2013-03-21 Thread Orit Wasserman
This allow us to add a buffer to the iovec to send without copying it into the static buffer. Signed-off-by: Orit Wasserman --- include/migration/qemu-file.h | 5 + savevm.c | 42 -- 2 files changed, 29 insertions(+), 18 deletions