All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Roman Penyaev <r.peniaev@gmail.com>
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>,
	qemu-devel@nongnu.org, "Bonzini, Paolo" <pbonzini@redhat.com>
Subject: Re: [PATCH v6 6/8] chardev/char-mux: implement backend chardev multiplexing
Date: Fri, 10 Jan 2025 08:57:58 +0000	[thread overview]
Message-ID: <Z4DhFtc9UgcKQHuh@redhat.com> (raw)
In-Reply-To: <CACZ9PQV8pfNq46cPcpv7NZ7cx2bEnuhBToa-DEg9oaLHFuGzHg@mail.gmail.com>

On Fri, Jan 10, 2025 at 09:43:52AM +0100, Roman Penyaev wrote:
> On Thu, Jan 9, 2025 at 7:07 PM Daniel P. Berrangé <berrange@redhat.com> wrote:
> >
> > On Thu, Jan 09, 2025 at 01:56:40PM +0100, Roman Penyaev wrote:
> > > Hi,
> > >
> > > On Tue, Jan 7, 2025 at 3:57 PM Marc-André Lureau
> > > <marcandre.lureau@redhat.com> wrote:
> > > > Whether we talk about multiplexing front-end or back-end, the issues
> > > > are similar. In general, mixing input will create issues. Teeing
> > > > output is less problematic, except to handle the buffering...
> > >
> > > I understand your concerns. What exact issues do you have in mind?
> > > Are these issues related to the input buffer handling, so technical issues?
> > > Or issues with usability?
> >
> > While the design / impl technically allows for concurrent input to be
> > sent to the frontend, from multiple backends, in practice I don't think
> > we need to be particularly concerned about it.
> >
> > I don't see this as being a way for multiple different users to interact
> > concurrently. Rather I'd see 1 user of the VM just deciding to switch
> > from one backend to the other on the fly. IOW, although technically
> > possible, the user will only be leveraging one at a time to send input.
> >
> > We very definitely do need all backends to receive output from the guest
> > concurrently too, as you'd want the historical output context to be
> > visible on whatever backend you choose to use at any given point in time.
> >
> > If a user decides to be crazy and send input from multiple backends
> > concurrently, then they get to keep the mess.
> >
> > > > > Do you think we need to artificially introduce multiplexing logic to be fully
> > > > > compliant with multiplexer naming? It's not hard to do, repeating
> > > > > `mux_proc_byte()` from `mux-fe`. In my use-case, I'll still need to disable
> > > > > multiplexing in favor of 'mixing', for example with the 'mixer=on' option,
> > > > > i.e. '-chardev mux-be,mixer=on,...`. Or do you think it should be some
> > > > > completely different beast, something like mixer chardev?
> > > >
> > > > I think it would be saner to have the muxer be selectors: only work
> > > > with one selected be or fe. Otherwise, we can run into various issues.
> > >
> > > In multiplexing (not mixing) for the use-case that I am describing, there is one
> > > serious drawback: as soon as you switch the "focus" to another input device
> > > (for example from vnc to socket chardev), you will not be able to s]witch back
> > > from the same input console - the input now works on another device. This looks
> > > strange and does not add convenience to the final user. Perhaps, for a case
> > > other than console, this would be reasonable, but for console input -
> > > I would like
> > > to keep the mixer option: the front-end receives input from both back-ends.
> >
> > Agreed, I think this is desirable. If you did the exclusive access mode,
> > it'd complicate things as you now need a way to switch between active
> > backends, while also reducing the usefulness of it.
> >
> > The main thing I'm not a fan of here is the naming 'mux-fe', as I think we
> > should have something distinct from current 'mux', to reduce confusion
> > when we're talking about it.
> 
> The idea to have mux-fe and mux-be (current implementation) was born to
> distinguish what exactly we multiplex: front-ends or back-ends.
> 
> As Mark-Andre rightly noted, input from back-end devices is not multiplexed,
> but rather mixed.
> 
> >
> > How about 'overlay' or 'replicator' ?
> 
> Overlay for me has a strong association with the filesystem concept. This
> would work for me if combined back-end inputs function by layering one
> on top of another, with potentially higher-priority inputs overriding
> lower-priority ones. It implies a hierarchical or layered merging approach.
> Not quite well describes a simple mixing strategy.
> 
> Replicator - this can be a good name from front-end device point of view:
> suggests a mechanism for distributing the same input (front-end) to different
> destinations (back-ends).
> 
> Two more: what about 'aggregator' or even 'hub' ?

Yes, those are ok

> Also 'mixer'? So we have '-chardev mux' and '-chardev mix' (try not to get
> confused :)

AFAIR, users would not use '-chardev mux', but instead set 'mux=on' on the
real chardev backend.


With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



  reply	other threads:[~2025-01-10  8:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20241223132355.1417356-1-r.peniaev@gmail.com>
2024-12-30 11:35 ` [PATCH v6 0/8] chardev: implement backend chardev multiplexing Marc-André Lureau
2025-01-02 12:43   ` Roman Penyaev
     [not found] ` <20241223132355.1417356-7-r.peniaev@gmail.com>
2024-12-30 11:41   ` [PATCH v6 6/8] chardev/char-mux: " Marc-André Lureau
2025-01-02 10:21     ` Roman Penyaev
2025-01-07 14:57       ` Marc-André Lureau
2025-01-09 12:56         ` Roman Penyaev
2025-01-09 18:06           ` Daniel P. Berrangé
2025-01-10  8:43             ` Roman Penyaev
2025-01-10  8:57               ` Daniel P. Berrangé [this message]
2025-01-10 15:38                 ` Roman Penyaev
2025-01-13  9:34                   ` Marc-André Lureau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z4DhFtc9UgcKQHuh@redhat.com \
    --to=berrange@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=r.peniaev@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.