From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [PATCH 1/6] Use correct types to enable > 2G support Date: Fri, 01 Feb 2008 09:33:26 -0600 Message-ID: <47A33BC6.3060705@us.ibm.com> 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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, qemu-devel-qX2TKyscuCcdnm+yROfE0A@public.gmane.org, Paul Brook , Fabrice Bellard To: Avi Kivity Return-path: In-Reply-To: <47A33721.4020600-atKUWr5tajBWk0Htik3J/w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org 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 ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/