Re: [Qemu-devel] [PATCH RFC] qemu-file: output data directly if possible

2011-10-11 Thread Juan Quintela
"Michael S. Tsirkin" wrote: > On Mon, Oct 10, 2011 at 09:42:51AM +0200, Paolo Bonzini wrote: >> On 10/10/2011 01:56 AM, Michael S. Tsirkin wrote: >> >qemu file currently always buffers up data before writing it out. >> >At least for memory this is probably not a good idea: >> >writing out to file

Re: [Qemu-devel] [PATCH RFC] qemu-file: output data directly if possible

2011-10-10 Thread Paolo Bonzini
On 10/10/2011 03:16 PM, Michael S. Tsirkin wrote: Yes, it does look sane. QEMUFile doesn't seem to ever be used without QEMUBufferedFile - is that true? I think savevm does use it that way. With migration thread it will be much easier, because the migration thread can just block. I'd hold it

Re: [Qemu-devel] [PATCH RFC] qemu-file: output data directly if possible

2011-10-10 Thread Michael S. Tsirkin
On Mon, Oct 10, 2011 at 09:42:51AM +0200, Paolo Bonzini wrote: > On 10/10/2011 01:56 AM, Michael S. Tsirkin wrote: > >qemu file currently always buffers up data before writing it out. > >At least for memory this is probably not a good idea: > >writing out to file would be cheaper. Let's do > >that

Re: [Qemu-devel] [PATCH RFC] qemu-file: output data directly if possible

2011-10-10 Thread Paolo Bonzini
On 10/10/2011 01:56 AM, Michael S. Tsirkin wrote: qemu file currently always buffers up data before writing it out. At least for memory this is probably not a good idea: writing out to file would be cheaper. Let's do that if we can, which should be the common case. If we can't, buffer. Signed-of

[Qemu-devel] [PATCH RFC] qemu-file: output data directly if possible

2011-10-09 Thread Michael S. Tsirkin
qemu file currently always buffers up data before writing it out. At least for memory this is probably not a good idea: writing out to file would be cheaper. Let's do that if we can, which should be the common case. If we can't, buffer. Signed-off-by: Michael S. Tsirkin --- Completely untested,