From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JKxtW-0002kc-PS for qemu-devel@nongnu.org; Fri, 01 Feb 2008 10:33:34 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JKxtR-0002e6-AS for qemu-devel@nongnu.org; Fri, 01 Feb 2008 10:33:33 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JKxtR-0002dl-48 for qemu-devel@nongnu.org; Fri, 01 Feb 2008 10:33:29 -0500 Received: from e2.ny.us.ibm.com ([32.97.182.142]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JKxtQ-0003ei-VX for qemu-devel@nongnu.org; Fri, 01 Feb 2008 10:33:29 -0500 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e2.ny.us.ibm.com (8.13.8/8.13.8) with ESMTP id m11FXO5V031083 for ; Fri, 1 Feb 2008 10:33:24 -0500 Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v8.7) with ESMTP id m11FXOAr1075742 for ; Fri, 1 Feb 2008 10:33:24 -0500 Received: from d01av04.pok.ibm.com (loopback [127.0.0.1]) by d01av04.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m11FXOXS010300 for ; Fri, 1 Feb 2008 10:33:24 -0500 Message-ID: <47A33BC6.3060705@us.ibm.com> Date: Fri, 01 Feb 2008 09:33:26 -0600 From: Anthony Liguori MIME-Version: 1.0 References: <1201818980-27534-1-git-send-email-aliguori@us.ibm.com> <1201818980-27534-2-git-send-email-aliguori@us.ibm.com> <47A2F3C7.6060409@bellard.org> <47A32E40.3000204@us.ibm.com> <47A33721.4020600@qumranet.com> In-Reply-To: <47A33721.4020600@qumranet.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [kvm-devel] [PATCH 1/6] Use correct types to enable > 2G support Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: kvm-devel@lists.sourceforge.net, qemu-devel@nongnu.org, Paul Brook Avi Kivity wrote: > Anthony Liguori wrote: > >> I think I'll change this too into a single qemu_ram_alloc. That will >> fix the bug with KVM when using -kernel and large memory anyway :-) >> > > Won't that cause all of the memory in the hole to be wasted? > > You could munmap() it, but it's hardly elegant. > It only gets wasted if it gets faulted in. Any it won't get faulted in, so it won't increase the RSS size. We could madvise(MADV_DONTNEED) just to ensure that it's not occupying swap space if you were really paranoid about it. I don't think munmap()'ing malloc()'d memory is a very good idea. glibc may freak out. The alternative is to change all the places that assume phys_ram_base + PA which I don't like very much. Regards, Anthony Liguori