From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59844) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WNYbS-0000bT-P8 for qemu-devel@nongnu.org; Tue, 11 Mar 2014 22:09:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WNYbM-00064h-Pk for qemu-devel@nongnu.org; Tue, 11 Mar 2014 22:09:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:23177) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WNYbM-00064c-HW for qemu-devel@nongnu.org; Tue, 11 Mar 2014 22:09:00 -0400 Date: Tue, 11 Mar 2014 23:08:38 -0300 From: Marcelo Tosatti Message-ID: <20140312020838.GB8758@amt.cnet> References: <1393941656-29068-1-git-send-email-pbonzini@redhat.com> <1393941656-29068-18-git-send-email-pbonzini@redhat.com> <20140311035038.GB27803@G08FNSTD100614.fnst.cn.fujitsu.com> <531EC351.9030405@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <531EC351.9030405@redhat.com> Subject: Re: [Qemu-devel] [PATCH 2.1 17/28] memory: move mem_path handling to memory_region_allocate_system_memory List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: ehabkost@redhat.com, Hu Tao , qemu-devel@nongnu.org, imammedo@redhat.com, a.motakis@virtualopensystems.com, gaowanlong@cn.fujitsu.com On Tue, Mar 11, 2014 at 09:03:29AM +0100, Paolo Bonzini wrote: > Il 11/03/2014 04:50, Hu Tao ha scritto: > >On Tue, Mar 04, 2014 at 03:00:45PM +0100, Paolo Bonzini wrote: > >>Like the previous patch did in exec.c, split memory_region_init_ram and > >>memory_region_init_ram_from_file, and push mem_path one step further up. > >>Other RAM regions than system memory will now be backed by regular RAM. > > > >This changes qemu's behaviour regarding using hugetlbfs, especially when > >size of other RAM regions is significant compared to system memory. Will > >this a problem?(compatibilities, user configurations...) > > I think it's a bugfix, especially with 1G hugepages. Wasting 1G on > VGA memory is not really a good idea. What about this if (memory < hpagesize) { return NULL; } > >> > >>Also, boards that do not use memory_region_allocate_system_memory will > >>not support -mem-path anymore. This can be changed before the patches > >>are merged by migrating boards to use the function. > > > >IIUC, memory_region_allocate_system_memory() is only called once at > >board initialization time. In most cases, it just works. But there > >are cases that system memory is not initialized by a single call to > >memory_region_allocate_system_memory() that total memory is splitted > >into banks each of which is initialized individually, see > >ppc4xx_sdram_adjust(). How to convert to > >memory_region_allocate_system_memory() in this case? Should we map > >banks into numa nodes? > > The solution would be to use aliases to split the system RAM into banks. > > Paolo