qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Block layer roadmap


From: Kevin Wolf
Subject: Re: [Qemu-devel] Block layer roadmap
Date: Thu, 28 Jul 2011 15:10:29 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20110707 Thunderbird/5.0

Am 28.07.2011 14:54, schrieb Stefan Hajnoczi:
> On Thu, Jul 28, 2011 at 1:35 PM, Kevin Wolf <address@hidden> wrote:
>> Am 28.07.2011 14:09, schrieb Christoph Hellwig:
>>> On Wed, Jul 27, 2011 at 01:37:31PM +0100, Stefan Hajnoczi wrote:
>>>> Coroutines in the block layer [Kevin]
>>>>  * Programming model to simplify block drivers without blocking QEMU 
>>>> threads
>>>
>>> Can anyone explain what the whole point of this is?  It really just is
>>> a bit of syntactic sugar for the current async state machines.  What does
>>> it buy us over going for real threading?
>>
>> The only current block driver that really does everything in an async
>> state machine is qed. It's definitely not nice code, and having to
>> convert all of the other block drivers to this would be a lot of work.
> 
> Thanks Kevin :). 

I certainly didn't mean to attack your code or even yourself. It's not
that qed is done particularly bad or anything. That the code isn't
really nice is just the natural result of the callback-based programming
model.

>> So if it only means that we're making things async that would block the
>> VCPU until now, isn't that a great improvement already?
>>
>> The advantage compared to threading is that it allows an easy and
>> incremental transition.
> 
> Also remember that we already have a threads-based implementation of
> coroutines.  Later on we can do fine-grained locking and switch to
> threads directly instead of coroutines, if need be.

Might be an option for the future, but for now there's enough left to do
to take real advantage of coroutines.

Kevin



reply via email to

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