From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NrvbL-0002fB-5n for qemu-devel@nongnu.org; Wed, 17 Mar 2010 11:56:07 -0400 Received: from [199.232.76.173] (port=47281 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NrvbK-0002em-NO for qemu-devel@nongnu.org; Wed, 17 Mar 2010 11:56:06 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NrvbH-0000x5-Oz for qemu-devel@nongnu.org; Wed, 17 Mar 2010 11:56:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54763) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NrvbH-0000vF-3N for qemu-devel@nongnu.org; Wed, 17 Mar 2010 11:56:03 -0400 Date: Wed, 17 Mar 2010 16:55:42 +0100 From: Andrea Arcangeli Subject: Re: [Qemu-devel] [PATCH QEMU] Transparent Hugepage Support #3 Message-ID: <20100317155542.GE5752@random.random> References: <20100317145950.GA5752@random.random> <201003171521.26911.paul@codesourcery.com> <20100317153522.GC5752@random.random> <201003171552.15230.paul@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201003171552.15230.paul@codesourcery.com> 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 On Wed, Mar 17, 2010 at 03:52:15PM +0000, Paul Brook wrote: > > > > Size not multiple I think is legitimate, the below-4G chunk isn't > > > > required to end 2M aligned, all it matters is that the above-4G then > > > > starts aligned. In short one thing to add in the future as parameter > > > > to qemu_ram_alloc is the physical address that the host virtual > > > > address corresponds to. > > > > > > In general you don't know this at allocation time. > > > > Caller knows it, it's not like the caller is outside of qemu, it's not > > some library. We know this is enough with the caller that there is now. > > No we don't. As discussed previously, there are machines where the physical > location of RAM is configurable at runtime. In fact it's common for the ram > to be completely absent at reset. This is why PREFERRED_RAM_ALIGN is only defined for __x86_64__. I'm not talking about other archs that may never support transparent hugepages in the kernel because of other architectural constrains that may prevent to map hugepages mixed with regular pages in the same vma.