From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42707) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSJG4-0006Cz-0S for qemu-devel@nongnu.org; Wed, 27 Jul 2016 03:28:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bSJFy-0003pY-3O for qemu-devel@nongnu.org; Wed, 27 Jul 2016 03:27:59 -0400 Received: from mx-v6.kamp.de ([2a02:248:0:51::16]:60196 helo=mx01.kamp.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSJFx-0003pL-Pn for qemu-devel@nongnu.org; Wed, 27 Jul 2016 03:27:54 -0400 Message-ID: <57986274.3030006@kamp.de> Date: Wed, 27 Jul 2016 09:27:48 +0200 From: Peter Lieven MIME-Version: 1.0 References: <1468340586-19304-1-git-send-email-pl@kamp.de> In-Reply-To: <1468340586-19304-1-git-send-email-pl@kamp.de> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH V5 0/6] coroutine: mmap stack memory and stack size List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, mreitz@redhat.com, pbonzini@redhat.com, mst@redhat.com, dgilbert@redhat.com, peter.maydell@linaro.org, eblake@redhat.com, rth@twiddle.net, armbru@redhat.com Am 12.07.2016 um 18:23 schrieb Peter Lieven: > I decided to split this from the rest of the Qemu RSS usage series as > it contains the more or less non contentious patches. > > I omitted the MAP_GROWSDOWN flag in mmap as we are not 100% sure which > side effects it has. > > I kept the guard page which is now nicely makes the stacks visible in > smaps. The old version of the relevent patch lacked the MAP_FIXED flag > in the second call to mmap. > > The last patch which reduces the stack size of coroutines to 64kB > may be omitted if its found to risky. > > v4->v5: > - Patch 1: check if _SC_THREAD_STACK_MIN is defined > - Patch 1: guard against sysconf(_SC_THREAD_STACK_MIN) returning -1 [Eric] > > v3->v4: > - Patch 1: add a static function to adjust the stack size [Richard] > - Patch 1: round up the stack size to multiple of the pagesize. > > v2->v3: > - Patch 1,6: adjusted commit message to mention the guard page [Markus] > > v1->v2: > - Patch 1: added an architecture dependend guard page [Richard] > - Patch 1: avoid stacks smaller than _SC_THREAD_STACK_MIN [Richard] > - Patch 1: use mmap+mprotect instead of mmap+mmap [Richard] > - Patch 5: u_int32_t -> uint32_t [Richard] > - Patch 5: only available if stack grows down > > Peter Lieven (6): > oslib-posix: add helpers for stack alloc and free > coroutine: add a macro for the coroutine stack size > coroutine-ucontext: use helper for allocating stack memory > coroutine-sigaltstack: use helper for allocating stack memory > oslib-posix: add a configure switch to debug stack usage > coroutine: reduce stack size to 64kB > > configure | 19 ++++++++++ > include/qemu/coroutine_int.h | 2 ++ > include/sysemu/os-posix.h | 23 ++++++++++++ > util/coroutine-sigaltstack.c | 7 ++-- > util/coroutine-ucontext.c | 9 +++-- > util/coroutine-win32.c | 2 +- > util/oslib-posix.c | 83 ++++++++++++++++++++++++++++++++++++++++++++ > 7 files changed, 135 insertions(+), 10 deletions(-) > Ping. Peter