qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/2] char: use a fixed idx for child muxed chr


From: Marc-André Lureau
Subject: Re: [Qemu-devel] [PATCH 2/2] char: use a fixed idx for child muxed chr
Date: Wed, 12 Oct 2016 09:03:51 +0000

Hi

On Tue, Oct 11, 2016 at 8:44 PM Daniel P. Berrange <address@hidden>
wrote:

>
> Not sure if this is immediately helpful to your scneario or
> not, but I'd like to see the qemu_chr_add_handlers method
> removed long term, and everything converted to use the
> qemu_chr_fe_add_watch function instead. This reverses the data
> flow pattern - with chr_add_handlers the chardev code pushes
> data from the backend into the frontends, but with fe_add_watch
> the frontend pulls data from the backend.
>

Very interesting, that would help, but I think that wouldn't be enough,
since we would still have the "event" handlers to properly register/track.
Furthermore, that upside-down change is not easy. I think I will simply go
with a new fe handler tag.


>
> To properly fix the non-blocking writes from the frontend to
> the backend[1] will likely require use of qemu_chr_fe_add_watch,
> and so having that function used for everything will make the
> code clearer overall IMHO.
>
> Regards,
> Daniel
>
> [1] eg the long term solution to replace this hack:
>
> commit 90f998f5f4267a0c22e983f533d19b9de1849283
> Author: Daniel P. Berrange <address@hidden>
> Date:   Tue Sep 6 14:56:05 2016 +0100
>
>     char: convert qemu_chr_fe_write to qemu_chr_fe_write_all
>
>
> --
> |: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/
> :|
> |: http://libvirt.org              -o-             http://virt-manager.org
> :|
> |: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/
> :|
>
-- 
Marc-André Lureau


reply via email to

[Prev in Thread] Current Thread [Next in Thread]