From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MIpWe-0001RJ-PF for qemu-devel@nongnu.org; Mon, 22 Jun 2009 15:49:56 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MIpWa-0001Ny-3j for qemu-devel@nongnu.org; Mon, 22 Jun 2009 15:49:56 -0400 Received: from [199.232.76.173] (port=43078 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MIpWZ-0001Nn-Rl for qemu-devel@nongnu.org; Mon, 22 Jun 2009 15:49:51 -0400 Received: from e37.co.us.ibm.com ([32.97.110.158]:35358) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MIpWZ-0005se-EW for qemu-devel@nongnu.org; Mon, 22 Jun 2009 15:49:51 -0400 Received: from d03relay02.boulder.ibm.com (d03relay02.boulder.ibm.com [9.17.195.227]) by e37.co.us.ibm.com (8.13.1/8.13.1) with ESMTP id n5MJn5Qa017873 for ; Mon, 22 Jun 2009 13:49:05 -0600 Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167]) by d03relay02.boulder.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n5MJnlf8073460 for ; Mon, 22 Jun 2009 13:49:47 -0600 Received: from d03av01.boulder.ibm.com (loopback [127.0.0.1]) by d03av01.boulder.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n5MJnllo006036 for ; Mon, 22 Jun 2009 13:49:47 -0600 Message-ID: <4A3FE059.9040208@us.ibm.com> Date: Mon, 22 Jun 2009 14:49:45 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [Qemu-commits] [COMMIT 3086844] Instead of writing a zero page, madvise it away References: <200906221549.n5MFn3Qd015389@d03av02.boulder.ibm.com> <4A3FB390.4060809@redhat.com> <4A3FB95D.3060404@us.ibm.com> <200906222038.01469.paul@codesourcery.com> In-Reply-To: <200906222038.01469.paul@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: qemu-devel@nongnu.org, Avi Kivity Paul Brook wrote: >>>>> We have the same issue on the migration source node. I don't see a >>>>> simple way to solve it, though. >>>>> >>>> I don't follow. In this case, the issue is: >>>> >>>> 1) Start a guest with 1024, balloon down to 128MB. RSS size is now >>>> ~128MB >>>> 2) Live migrate to a different node >>>> 3) RSS on different node jumps to ~1GB >>>> >>> 3.5) RSS on source node jumps to ~1GB, since reading the page >>> instantiates the pte >>> >> Surely we can do better here... >> > > Huh, I'm surprised we have to. I was expecting linux to populate the region > with CoW mappings of a single zero page, but apparently not. I guess reading a > zero page without writing to it is a fairly rare case, and it's usually better > to instantiate a writable page on the first access. > I did too. If you mmap(/dev/zero) you'll get that behavior but not with a normal allocation. Regards, Anthony Liguori > Paul > -- Regards, Anthony Liguori