[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v8 16/54] Return path: Open a return path on QEM
From: |
Dr. David Alan Gilbert |
Subject: |
Re: [Qemu-devel] [PATCH v8 16/54] Return path: Open a return path on QEMUFile for sockets |
Date: |
Fri, 2 Oct 2015 17:32:18 +0100 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
* Daniel P. Berrange (address@hidden) wrote:
> On Tue, Sep 29, 2015 at 09:37:40AM +0100, Dr. David Alan Gilbert (git) wrote:
> > From: "Dr. David Alan Gilbert" <address@hidden>
> >
> > Postcopy needs a method to send messages from the destination back to
> > the source, this is the 'return path'.
> >
> > Wire it up for 'socket' QEMUFile's.
>
> I find this to be a pretty wierd approach to the problem. THe underlying
> transport is bi-directional, so I would expect to have a single QEMUFile
> object that allowed bi-directional I/O on it, rather than creating a
> second QEMUFile for the back channel, which was forbidden from closing
> the shared FD.
>
> I can understand why you've done this though - since we only have a
> single buffer embedded in QEMUFile. I wonder though if we'd be better
> off changing QEMUFile to have a 'inbuf' and 'outbuf' intead of just
> 'buf' and likewise iniov & outiov. Then we can allow bi-directional
> I/O on the single QEMUFile object which is a more natural fit.
The 'c' FILE* is one directional, and I just took it that the QEMUFile* is
like that; i.e. a buffered layer on top of an underlying one directional
transport. stdin,stdout are two separate FILE*'s.
Your iniov, outiov would be basically the same, so you'd end up duplicating
code for the in and out parts; where as what you really have is two of the same
thing wired up in opposite directions.
Having said that, for things like RDMA, they have to do special stuff for
each direction and the QEMUFile is really a shim on top of that.
Dave
>
> Regards,
> Daniel
> --
> |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
> |: http://libvirt.org -o- http://virt-manager.org :|
> |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
> |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
--
Dr. David Alan Gilbert / address@hidden / Manchester, UK
- [Qemu-devel] [PATCH v8 09/54] Add QEMU_MADV_NOHUGEPAGE, (continued)
- [Qemu-devel] [PATCH v8 09/54] Add QEMU_MADV_NOHUGEPAGE, Dr. David Alan Gilbert (git), 2015/10/01
- [Qemu-devel] [PATCH v8 10/54] migration/ram.c: Use RAMBlock rather than MemoryRegion, Dr. David Alan Gilbert (git), 2015/10/01
- [Qemu-devel] [PATCH v8 11/54] ram_debug_dump_bitmap: Dump a migration bitmap as text, Dr. David Alan Gilbert (git), 2015/10/01
- [Qemu-devel] [PATCH v8 12/54] migrate_init: Call from savevm, Dr. David Alan Gilbert (git), 2015/10/01
- [Qemu-devel] [PATCH v8 13/54] Move dirty page search state into separate structure, Dr. David Alan Gilbert (git), 2015/10/01
- [Qemu-devel] [PATCH v8 14/54] ram_find_and_save_block: Split out the finding, Dr. David Alan Gilbert (git), 2015/10/01
- [Qemu-devel] [PATCH v8 15/54] Rename save_live_complete to save_live_complete_precopy, Dr. David Alan Gilbert (git), 2015/10/01
- [Qemu-devel] [PATCH v8 17/54] Return path: socket_writev_buffer: Block even on non-blocking fd's, Dr. David Alan Gilbert (git), 2015/10/01
- [Qemu-devel] [PATCH v8 16/54] Return path: Open a return path on QEMUFile for sockets, Dr. David Alan Gilbert (git), 2015/10/01
- [Qemu-devel] [PATCH v8 18/54] Migration commands, Dr. David Alan Gilbert (git), 2015/10/01
- [Qemu-devel] [PATCH v8 19/54] Return path: Control commands, Dr. David Alan Gilbert (git), 2015/10/01
- [Qemu-devel] [PATCH v8 20/54] Return path: Send responses from destination to source, Dr. David Alan Gilbert (git), 2015/10/01
- [Qemu-devel] [PATCH v8 22/54] Rework loadvm path for subloops, Dr. David Alan Gilbert (git), 2015/10/01
- [Qemu-devel] [PATCH v8 21/54] Return path: Source handling of return path, Dr. David Alan Gilbert (git), 2015/10/01