From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43326) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHpU8-0000lu-SM for qemu-devel@nongnu.org; Tue, 28 Jun 2016 05:39:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bHpU5-0003JA-M6 for qemu-devel@nongnu.org; Tue, 28 Jun 2016 05:39:12 -0400 Received: from mx-v6.kamp.de ([2a02:248:0:51::16]:46071 helo=mx01.kamp.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHpU5-0003It-CS for qemu-devel@nongnu.org; Tue, 28 Jun 2016 05:39:09 -0400 References: <1467104499-27517-1-git-send-email-pl@kamp.de> <1467104499-27517-8-git-send-email-pl@kamp.de> <20160628092918.GD2243@work-vm> From: Peter Lieven Message-ID: <577245B7.3090502@kamp.de> Date: Tue, 28 Jun 2016 11:39:03 +0200 MIME-Version: 1.0 In-Reply-To: <20160628092918.GD2243@work-vm> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 07/15] qapi: use mmap for QmpInputVisitor List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Dr. David Alan Gilbert" Cc: qemu-devel@nongnu.org, kwolf@redhat.com, mreitz@redhat.com, pbonzini@redhat.com, mst@redhat.com, peter.maydell@linaro.org, kraxel@redhat.com Am 28.06.2016 um 11:29 schrieb Dr. David Alan Gilbert: > * Peter Lieven (pl@kamp.de) wrote: >> this struct is approx 75kB > I wonder why it's so large. > > The stack size in QmpInputVisitor; it's got a 1024 element stack > (QIV_STACK_SIZE) and I bet we never use anywhere near that. > > But even then that's 1024 * a 3 pointer stack object, 24 bytes - > I don't see where the rest of that 75kB comes from. Sorry, I had a wrong size in mind. Its 24736 bytes. But thats still larger than expecetd, right? > I'm a little wary about turning all these malloc's into mmap's > because we do seem to use things like input visitors for small > things; don't the cost of doing the mmap's add up in time > instead of space? Sure, we should discuss this. The series should act as a base for discussion. None of the things I changed into mmap are continously called during VM runtime. So it most likely only happens at setup of the vServer. It seems that the worst impact hat the PhysPageMap in exec.c Peter