[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 0/5] vhost-user block device backend implementation
From: |
Coiby Xu |
Subject: |
Re: [PATCH v4 0/5] vhost-user block device backend implementation |
Date: |
Wed, 26 Feb 2020 23:18:41 +0800 |
Hi Stefan,
Thank you for reviewing my code!
I tried to reach you on IRC. But somehow either you missed my message
or I missed your reply. So I will reply by email instead.
If we use qio_channel_set_aio_fd_handler to monitor G_IO_IN event,
i.e. use vu_dispatch as the read handler, then we can re-use
vu_message_read. And "removing the blocking recv from libvhost-user"
isn't necessary because "the operation of poll() and ppoll() is not
affected by the O_NONBLOCK flag" despite that we use
qio_channel_set_blocking before calling qio_channel_set_aio_fd_handler
to make recv non-blocking.
Previously I needed to run customized vu_kick_cb as coroutines to call
blk_co_readv/blk_co_writev directly. After taking Kevin's feedback on
v4 into consideration, now I use aio_set_fd_handler to set a read
handler for kick_fd and this read handler will then call vu_kick_cb.
On Thu, Feb 20, 2020 at 1:58 AM Stefan Hajnoczi <address@hidden> wrote:
>
> On Tue, Feb 18, 2020 at 01:07:06PM +0800, Coiby Xu wrote:
> > v4:
> > * add object properties in class_init
> > * relocate vhost-user-blk-test
> > * other changes including using SocketAddress, coding style, etc.
>
> Thanks! I think the vhost-user server code can be simplified if
> libvhost-user uses the event loop for asynchronous socket I/O. Then
> it's no longer necessary to duplicate vu_message_read() and
> vu_kick_cb(). I've replied to Patch 1 and we can discuss on IRC if you
> want to chat about it.
>
> I've also CCed Marc-André to see what he thinks about removing the
> blocking recv from libvhost-user and instead using the event loop (just
> like for eventfds).
>
> Stefan
--
Best regards,
Coiby
- [PATCH v4 1/5] extend libvhost to support IOThread and coroutine, (continued)
- [PATCH v4 1/5] extend libvhost to support IOThread and coroutine, Coiby Xu, 2020/02/18
- [PATCH v4 2/5] generic vhost user server, Coiby Xu, 2020/02/18
- [PATCH v4 3/5] vhost-user block device backend server, Coiby Xu, 2020/02/18
- [PATCH v4 4/5] a standone-alone tool to directly share disk image file via vhost-user protocol, Coiby Xu, 2020/02/18
- [PATCH v4 5/5] new qTest case to test the vhost-user-blk-server, Coiby Xu, 2020/02/18
- Re: [PATCH v4 0/5] vhost-user block device backend implementation, Stefan Hajnoczi, 2020/02/19
- Re: [PATCH v4 0/5] vhost-user block device backend implementation,
Coiby Xu <=
- Re: [PATCH v4 0/5] vhost-user block device backend implementation, Stefan Hajnoczi, 2020/02/27
- Re: [PATCH v4 0/5] vhost-user block device backend implementation, Coiby Xu, 2020/02/27
- Re: [PATCH v4 0/5] vhost-user block device backend implementation, Kevin Wolf, 2020/02/27
- Re: [PATCH v4 0/5] vhost-user block device backend implementation, Coiby Xu, 2020/02/27
- Re: [PATCH v4 0/5] vhost-user block device backend implementation, Kevin Wolf, 2020/02/27
- Re: [PATCH v4 0/5] vhost-user block device backend implementation, Marc-André Lureau, 2020/02/27
- Re: [PATCH v4 0/5] vhost-user block device backend implementation, Kevin Wolf, 2020/02/27
- Re: [PATCH v4 0/5] vhost-user block device backend implementation, Daniel P . Berrangé, 2020/02/27
- Re: [PATCH v4 0/5] vhost-user block device backend implementation, Marc-André Lureau, 2020/02/27