qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Leonardo Bras Soares Passos <leobras@redhat.com>
Cc: qemu-devel <qemu-devel@nongnu.org>,
	Jason Wang <jasowang@redhat.com>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	Peter Xu <peterx@redhat.com>, Juan Quintela <quintela@redhat.com>
Subject: Re: [PATCH v3 1/3] QIOChannel: Add io_async_writev & io_async_flush callbacks
Date: Thu, 30 Sep 2021 09:34:09 +0100	[thread overview]
Message-ID: <YVV2ga3BNL8ubrRr@redhat.com> (raw)
In-Reply-To: <CAJ6HWG6F9nyJKvS436-NznqEmG_vQ5K=3mxib-5QtkqZ8gqwLQ@mail.gmail.com>

On Wed, Sep 29, 2021 at 04:06:33PM -0300, Leonardo Bras Soares Passos wrote:
> Hello Peter, thanks for reviewing!
> 
> On Tue, Sep 28, 2021 at 6:52 PM Peter Xu <peterx@redhat.com> wrote:
> >
> > On Fri, Sep 24, 2021 at 06:16:04PM +0100, Daniel P. Berrangé wrote:
> > > > +ssize_t qio_channel_async_writev(QIOChannel *ioc,
> > > > +                                 const struct iovec *iov,
> > > > +                                 size_t niov,
> > > > +                                 int *fds,
> > > > +                                 size_t nfds,
> > > > +                                 Error **errp);
> > >
> > > This is missing any flags. We need something like
> > >
> > >    QIO_CHANNEL_WRITE_FLAG_ZEROCOPY
> > >
> > > passed in an 'unsigned int flags' parameter. This in
> > > turn makes me question whether we should have the
> > > common helpers at all, as the api is going to be
> > > different for sync vs async.
> > >
> > > The QIOChannelFeature enum probably ought to be
> > > extended with QIO_CHANNEL_FEATURE_WRITE_ZEROCOPY with
> > > support for probing whether that's supported or not.
> >
> > I'm also wondering whether we could just drop the fds/nfds as per my knowledge
> > SCM_RIGHT is the only user, at the meantime I don't see why an async interface
> > would pass in any fd anyways..  Thanks,
> 
> FWIW, I think it's a great idea.
> Daniel, what do you think?

Yes, FD passing is not compatible with async operations, becuase it is
too complex to deal with FD lifetime on failure to send IO


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:[~2021-09-30  8:35 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-22 22:24 [PATCH v3 0/3] QIOChannel async_write & async_flush + MSG_ZEROCOPY + multifd Leonardo Bras
2021-09-22 22:24 ` [PATCH v3 1/3] QIOChannel: Add io_async_writev & io_async_flush callbacks Leonardo Bras
2021-09-24 17:16   ` Daniel P. Berrangé
2021-09-28 21:52     ` Peter Xu
2021-09-29 19:06       ` Leonardo Bras Soares Passos
2021-09-30  8:34         ` Daniel P. Berrangé [this message]
2021-09-29 19:03     ` Leonardo Bras Soares Passos
2021-09-22 22:24 ` [PATCH v3 2/3] QIOChannelSocket: Implement io_async_write & io_async_flush Leonardo Bras
2021-09-24 17:38   ` Daniel P. Berrangé
2021-09-29 19:32     ` Leonardo Bras Soares Passos
2021-09-30  8:39       ` Daniel P. Berrangé
2021-09-28 22:45   ` Peter Xu
2021-09-29 19:36     ` Leonardo Bras Soares Passos
2021-09-29 19:58       ` Peter Xu
2021-09-22 22:24 ` [PATCH v3 3/3] multifd: Send using asynchronous write on nocomp to send RAM pages Leonardo Bras
2021-09-24 17:43   ` Daniel P. Berrangé
2021-09-28 22:48     ` Peter Xu
2021-09-29 19:46       ` Leonardo Bras Soares Passos
2021-09-29 19:44     ` Leonardo Bras Soares Passos
2021-09-28 22:50 ` [PATCH v3 0/3] QIOChannel async_write & async_flush + MSG_ZEROCOPY + multifd Peter Xu
2021-09-29 18:34   ` Leonardo Bras Soares Passos
2021-09-29 19:22     ` Peter Xu
2021-09-29 19:48       ` Leonardo Bras Soares Passos

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=YVV2ga3BNL8ubrRr@redhat.com \
    --to=berrange@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=leobras@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).