From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: file_ram_alloc: unify mem-path,mem-prealloc error handling Date: Thu, 27 Feb 2014 22:05:57 -0300 Message-ID: <20140228010557.GA12337@amt.cnet> References: <20140204184153.GA25368@amt.cnet> <530F8442.7090007@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: qemu-devel , kvm-devel To: Paolo Bonzini Return-path: Received: from mx1.redhat.com ([209.132.183.28]:1672 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751628AbaB1OlR (ORCPT ); Fri, 28 Feb 2014 09:41:17 -0500 Content-Disposition: inline In-Reply-To: <530F8442.7090007@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, Feb 27, 2014 at 07:30:26PM +0100, Paolo Bonzini wrote: > Il 04/02/2014 19:41, Marcelo Tosatti ha scritto: > > > >-mem-prealloc asks to preallocate memory residing on -mem-path path. > > > >Currently QEMU exits in case: > > > >- Memory file has been created but allocation via explicit write > >fails. > > > >And it fallbacks to malloc in case: > >- Querying huge page size fails. > >- Lack of sync MMU support. > >- Open fails. > >- mmap fails. > > > >Have the same behaviour for all cases: fail in case -mem-path and > >-mem-prealloc are specified for regions where the requested size is > >suitable for hugepages. > > > >Signed-off-by: Marcelo Tosatti > > Once we introduce memdev, I believe -mem-path should always exit, > and never fall back to malloc/MAP_ANON. Agree. From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58857) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WJOct-0008BC-3H for qemu-devel@nongnu.org; Fri, 28 Feb 2014 09:41:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WJOcn-0008Fm-4n for qemu-devel@nongnu.org; Fri, 28 Feb 2014 09:41:23 -0500 Received: from mx1.redhat.com ([209.132.183.28]:38322) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WJOcm-0008FY-Tf for qemu-devel@nongnu.org; Fri, 28 Feb 2014 09:41:17 -0500 Date: Thu, 27 Feb 2014 22:05:57 -0300 From: Marcelo Tosatti Message-ID: <20140228010557.GA12337@amt.cnet> References: <20140204184153.GA25368@amt.cnet> <530F8442.7090007@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <530F8442.7090007@redhat.com> Subject: Re: [Qemu-devel] file_ram_alloc: unify mem-path, mem-prealloc error handling List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel , kvm-devel On Thu, Feb 27, 2014 at 07:30:26PM +0100, Paolo Bonzini wrote: > Il 04/02/2014 19:41, Marcelo Tosatti ha scritto: > > > >-mem-prealloc asks to preallocate memory residing on -mem-path path. > > > >Currently QEMU exits in case: > > > >- Memory file has been created but allocation via explicit write > >fails. > > > >And it fallbacks to malloc in case: > >- Querying huge page size fails. > >- Lack of sync MMU support. > >- Open fails. > >- mmap fails. > > > >Have the same behaviour for all cases: fail in case -mem-path and > >-mem-prealloc are specified for regions where the requested size is > >suitable for hugepages. > > > >Signed-off-by: Marcelo Tosatti > > Once we introduce memdev, I believe -mem-path should always exit, > and never fall back to malloc/MAP_ANON. Agree.