qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v3 1/3] QIOChannel: Add io_async_writev & io_async_flush call


From: Daniel P . Berrangé
Subject: Re: [PATCH v3 1/3] QIOChannel: Add io_async_writev & io_async_flush callbacks
Date: Thu, 30 Sep 2021 09:34:09 +0100
User-agent: Mutt/2.0.7 (2021-05-04)

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 via email to

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