qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] coroutines and block I/O considerations


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] coroutines and block I/O considerations
Date: Tue, 19 Jul 2011 11:57:30 +0100

On Tue, Jul 19, 2011 at 11:10 AM, Kevin Wolf <address@hidden> wrote:
> Am 19.07.2011 10:06, schrieb Frediano Ziglio:
>> 2- memory considerations on coroutines. Beside coroutines allow more
>> readable code I wonder if somebody considered memory. For every
>> coroutines a different stack has to be allocated. For instance
>> ucontext and win32 implementation use 4mb. Assuming 128 concurrent AIO
>> this require about 512mb of ram (mostly only committed but not used
>> and coroutines are reused).
>
> 128 concurrent requests is a lot. And even then, it's only virtual
> memory. I doubt that we're actually using much more than we do in the
> old code with the AIOCBs (which will disappear and become local
> variables when we complete the conversion).

>From what I understand "committed" on Windows means that physical
pages have been allocated and pagefile space has been set aside:
http://msdn.microsoft.com/en-us/library/ms810627.aspx

On Linux memory is overcommitted and will not require swap space or
any actual pages.  This behavior can be configured differently IIRC
but the default is to be lazy about claiming memory resources so that
even 4 MB thread/coroutine stacks are not an issue.

The question is how can we get the same effect on Windows and does the
current Fibers implementation not already work?

Stefan



reply via email to

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