[Top][All Lists]

[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: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 05/16] io: make qio_channel_yield aware of AioContexts
Date: Mon, 16 Jan 2017 13:24:39 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1

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


reply via email to

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