From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34795) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WNHfB-0008Ub-7Y for qemu-devel@nongnu.org; Tue, 11 Mar 2014 04:03:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WNHf5-0002kK-21 for qemu-devel@nongnu.org; Tue, 11 Mar 2014 04:03:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40771) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WNHf4-0002k9-Qt for qemu-devel@nongnu.org; Tue, 11 Mar 2014 04:03:42 -0400 Message-ID: <531EC351.9030405@redhat.com> Date: Tue, 11 Mar 2014 09:03:29 +0100 From: Paolo Bonzini MIME-Version: 1.0 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> In-Reply-To: <20140311035038.GB27803@G08FNSTD100614.fnst.cn.fujitsu.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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: Hu Tao Cc: ehabkost@redhat.com, mtosatti@redhat.com, qemu-devel@nongnu.org, imammedo@redhat.com, a.motakis@virtualopensystems.com, gaowanlong@cn.fujitsu.com 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. >> >> 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