[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 05/16] io: make qio_channel_yield aware of AioCo
From: |
Daniel P. Berrange |
Subject: |
Re: [Qemu-devel] [PATCH 05/16] io: make qio_channel_yield aware of AioContexts |
Date: |
Mon, 16 Jan 2017 12:59:47 +0000 |
User-agent: |
Mutt/1.7.1 (2016-10-04) |
On Mon, Jan 16, 2017 at 08:47:28PM +0800, Fam Zheng wrote:
> On Mon, 01/16 13:24, Paolo Bonzini wrote:
> >
> >
> > On 16/01/2017 12:38, Fam Zheng wrote:
> > >> +void qio_channel_detach_aio_context(QIOChannel *ioc)
> > >> +{
> > >> + ioc->read_coroutine = NULL;
> > >> + ioc->write_coroutine = NULL;
> > >> + qio_channel_set_aio_fd_handlers(ioc);
> > >> + ioc->ctx = NULL;
> > >
> > > Why is qio_channel_set_aio_fd_handler not needed here?
> >
> > Because there are no read_coroutine and write_coroutine anymore. The
> > caller needs to schedule them on the right AioContext after calling
> > qio_channel_set_aio_context. See nbd_client_attach_aio_context in the
> > next patch for an example.
> >
> > >> -tests/test-char$(EXESUF): tests/test-char.o qemu-char.o qemu-timer.o
> > >> $(test-util-obj-y) $(qtest-obj-y) $(test-io-obj-y)
> > >> +tests/test-char$(EXESUF): tests/test-char.o qemu-char.o qemu-timer.o
> > >> $(test-util-obj-y) $(qtest-obj-y) $(test-io-obj-y) $(test-block-obj-y)
> > >
> > > I guess this is a hint for moving coroutine code into a lower level
> > > library like
> > > util.
> >
> > Coroutine, or AioContext? The reason for this is that io/ now uses
> > aio_co_wake.
>
> Or both. It just feels a bit odd to see *char* depend on *block*, maybe
> there're
> more such dependencies to come even outside tests/?
>
> Not necessarily for this series, of course.
On the contrary, I think it should be in this series - we shouldn't
introduce a dependancy on the block layer from io layer.
Regards,
Daniel
--
|: 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/ :|
- [Qemu-devel] [PATCH 00/16] aio_context_acquire/release pushdown, part 2, Paolo Bonzini, 2017/01/13
- [Qemu-devel] [PATCH 02/16] block-backend: allow blk_prw from coroutine context, Paolo Bonzini, 2017/01/13
- [Qemu-devel] [PATCH 03/16] test-thread-pool: use generic AioContext infrastructure, Paolo Bonzini, 2017/01/13
- [Qemu-devel] [PATCH 05/16] io: make qio_channel_yield aware of AioContexts, Paolo Bonzini, 2017/01/13
- Re: [Qemu-devel] [PATCH 05/16] io: make qio_channel_yield aware of AioContexts, Daniel P. Berrange, 2017/01/16
- Re: [Qemu-devel] [PATCH 05/16] io: make qio_channel_yield aware of AioContexts, Stefan Hajnoczi, 2017/01/18
Re: [Qemu-devel] [PATCH 05/16] io: make qio_channel_yield aware of AioContexts, Daniel P. Berrange, 2017/01/16
Re: [Qemu-devel] [PATCH 05/16] io: make qio_channel_yield aware of AioContexts, Stefan Hajnoczi, 2017/01/18
[Qemu-devel] [PATCH 04/16] io: add methods to set I/O handlers on AioContext, Paolo Bonzini, 2017/01/13