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).