From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47891) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGpu9-0004Wv-3i for qemu-devel@nongnu.org; Fri, 21 Feb 2014 08:12:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WGpu2-00014S-V9 for qemu-devel@nongnu.org; Fri, 21 Feb 2014 08:12:37 -0500 Received: from mail-pa0-f45.google.com ([209.85.220.45]:42546) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGpu2-00014O-Oh for qemu-devel@nongnu.org; Fri, 21 Feb 2014 08:12:30 -0500 Received: by mail-pa0-f45.google.com with SMTP id lf10so3428990pab.18 for ; Fri, 21 Feb 2014 05:12:30 -0800 (PST) Message-ID: <53074ECC.7090606@ozlabs.ru> Date: Sat, 22 Feb 2014 00:04:12 +1100 From: Alexey Kardashevskiy MIME-Version: 1.0 References: <1392013975-1656-1-git-send-email-aik@ozlabs.ru> <5306DCC0.7010107@ozlabs.ru> <1A5B5EFA-FE6C-46F6-BA22-D524B6F43207@suse.de> <53074CF8.4090900@ozlabs.ru> <57F80552-CE67-411F-8263-35B84A3CEA54@suse.de> In-Reply-To: <57F80552-CE67-411F-8263-35B84A3CEA54@suse.de> Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH] file ram alloc: fail if cannot preallocate List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: Peter Maydell , Antonios Motakis , "list@suse.de:PowerPC" , QEMU Developers , Paolo Bonzini On 02/22/2014 12:02 AM, Alexander Graf wrote: > > On 21.02.2014, at 13:56, Alexey Kardashevskiy wrote: > >> On 02/21/2014 07:57 PM, Alexander Graf wrote: >>> >>> On 21.02.2014, at 05:57, Alexey Kardashevskiy wrote: >>> >>>> On 02/10/2014 05:32 PM, Alexey Kardashevskiy wrote: >>>>> At the moment if the user asked for huge pages and there is no more huge >>>>> pages, QEMU prints warning and falls back to the anonymous memory >>>>> allocator which is quite easy not to notice. QEMU also does so even >>>>> if the user specified -mem-prealloc and it seems wrong as the user >>>>> specifically requested huge pages for the entire RAM but QEMU failed to do >>>>> so and continued. On PPC64 this will produce a fragile guest as QEMU >>>>> tells the guest via device-tree that it can use huge pages when it >>>>> actually cannot. >>>>> >>>>> This adds message+exit if RAM cannot be preallocated from huge pages. >>>> >>>> >>>> Too bad? Should I increase my personal pinging timeout from 1 to 2 weeks to >>>> avoid annoying the community? :) Thanks! >>> >> >>> The patch changes the semantics of -mem-prealloc from "make sure all >>> RAM is mapped" to "make sure all RAM is mapped and is backed by huge >>> pages if we use huge pages" and thus is just plain wrong. >> >> ? I did actually expect it to alloc RAM from hugepages only. Otherwise >> there is no point in mem-prealloc. Yes, I am ignorant, I know. >> >>> The real question is why are we allowing sparsely mapped huge page >> backing at all? Should we change that? Do we need a new flag for this to >> specify "yes, I do want all my pages backed by -mem-path"? >> >> >> ? Add a switch to -mem-path saying "yes I really want -mem-path"? Sorry, I >> lost you here. -mem-path + -mem-prealloc - like this is not enough? Why >> would I specify -mem-path after all if I did not want RAM to backed by huge >> pages? > > I think it makes sense to disable any fallback for -mem-path, so that it > always only allocates RAM pages from the -mem-path pool. But this is a > big change from how it used to work before and thus needs to be properly > coordinated. ROMs, BARs - this all will stop working if I understand things right. And we (ozlabs) do not really want these things to be in huge pages. > > Paolo, Peter, any thoughts here? Version 2.0 might be a good fit for such a change ;). > > > Alex > -- Alexey