From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36282) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vbb2T-00024q-L3 for qemu-devel@nongnu.org; Wed, 30 Oct 2013 15:02:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vbb2N-0008OE-Lr for qemu-devel@nongnu.org; Wed, 30 Oct 2013 15:02:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:21573) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vbb2N-0008O8-DL for qemu-devel@nongnu.org; Wed, 30 Oct 2013 15:02:39 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r9UJ2cRO015001 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 30 Oct 2013 15:02:38 -0400 Date: Wed, 30 Oct 2013 16:30:35 -0200 From: Marcelo Tosatti Message-ID: <20131030183035.GA18378@amt.cnet> References: <20131024211249.723543071@amt.cnet> <5269B378.6040409@redhat.com> <20131025045805.GA18280@amt.cnet> <20131025115718.15b6e788@redhat.com> <20131025133421.GA27529@amt.cnet> <20131027162044.19769397@redhat.com> <20131028140406.GA18025@amt.cnet> <20131029190054.0c9faec5@nial.usersys.redhat.com> <20131029212149.GA32615@amt.cnet> <20131030084813.GB4651@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20131030084813.GB4651@redhat.com> Subject: Re: [Qemu-devel] [patch 2/2] i386: pc: align gpa<->hpa on 1GB boundary List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gleb Natapov Cc: aarcange@redhat.com, Igor Mammedov , qemu-devel@nongnu.org, Paolo Bonzini On Wed, Oct 30, 2013 at 10:48:13AM +0200, Gleb Natapov wrote: > On Tue, Oct 29, 2013 at 07:21:59PM -0200, Marcelo Tosatti wrote: > > > > Could add a warning to memory API: if memory region is larger than 1GB > > > > and RAM is 1GB backed, and not properly aligned, warn. > > > Perhaps it would be better do abort and ask user to fix configuration, > > > and on hugepage allocation failure not fallback to malloc but abort and > > > tell user amount of hugepages needed to run guest with hugepage backend. > > > > You want to back your guest with 1GB hugepages. You get 1 such page at a > > time, worst case. > > > > You either > > > > 1) map the guest physical address space region (1GB sized) where > > the hole is located with smaller page sizes, which must be 2MB, see *, > > which requires the user to specify a different hugetlbfs mount path with > > sufficient 2MB huge pages. > > > Why not really on THP to do the work? Because it might be the case that static hugepage assignment is desired (no guarantees of backingwith THP).