qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 03/15] coroutine-ucontext: reduce stack size to


From: Peter Lieven
Subject: Re: [Qemu-devel] [PATCH 03/15] coroutine-ucontext: reduce stack size to 64kB
Date: Tue, 28 Jun 2016 13:13:26 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0

Am 28.06.2016 um 12:54 schrieb Paolo Bonzini:

On 28/06/2016 11:01, Peter Lieven wrote:
evaluation with the recently introduced maximum stack size monitoring revealed
that the actual used stack size was never above 4kB so allocating 1MB stack
for each coroutine is a lot of wasted memory. So reduce the stack size to
64kB which should still give enough head room.
If we make the stack this much smaller, there is a non-zero chance of
smashing it.  You must add a guard page if you do this (actually more
than one because QEMU will happily have stack frames as big as 16 KB).
The stack counts for RSS but it's not actually allocated memory, so why
does it matter?

Is there an easy way to determinate how much of the RSS is actually allocated?
I erroneously it was all allocated....

So as for the stack, the MAP_GROWSDOWN is it really important? Will the kernel
allocate all pages of the stack otherwise if the last page is written?

I am asking because I don't know if MAP_GROWSDOWN is a good idea as Peter
mentioned there were discussions to deprecate it.

Peter




reply via email to

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