From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35003) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIdeB-0007k0-HQ for qemu-devel@nongnu.org; Wed, 26 Feb 2014 07:31:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WIde5-0002t5-Hv for qemu-devel@nongnu.org; Wed, 26 Feb 2014 07:31:35 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43122) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIde5-0002sv-9B for qemu-devel@nongnu.org; Wed, 26 Feb 2014 07:31:29 -0500 Date: Wed, 26 Feb 2014 13:31:19 +0100 From: Igor Mammedov Message-ID: <20140226133119.3ccca5a3@nial.usersys.redhat.com> In-Reply-To: <530DC2FA.9080401@redhat.com> References: <53047351.80300@redhat.com> <20140219103657.4daed264@nial.usersys.redhat.com> <20140226055706.GA5090@G08FNSTD100614.fnst.cn.fujitsu.com> <20140226101056.1a9ec3b3@nial.usersys.redhat.com> <530DC2FA.9080401@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v18 13/14] memory backend: fill memory backend ram fields List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Hu Tao , lersek@redhat.com, qemu-devel@nongnu.org, Wanlong Gao On Wed, 26 Feb 2014 11:33:30 +0100 Paolo Bonzini wrote: > Il 26/02/2014 10:10, Igor Mammedov ha scritto: > > if we assume that NUMA policies apply to every hostmem derived backend, > > then we could realize() approach used by DEVICE. i.e. > > set NUMA policies in hostmem.c:hostmemory_backend_memory_init() > > > > Add parent_complete field to ram-backend class and store there parent's > > complete pointer. Then we can do: > > > > ram_backend_memory_init(UserCreatable *uc, Error **errp) { > > memory_region_init_ram(); > > ... > > MEMORY_BACKEND_RAM_CLASS(uc)->parent_complete(uc, errp); > > ... > > } > > > > The problem is that some backends might not be handled the same way. > For example, not all backends might produce a single void*/size_t pair > for the entire region. Think of a "composite" backend that produces a > large memory region from two smaller ones. I'd prefer to keep backends simple, with 1:1 mapping to memory regions. Is there a need in composite one or something similar? > > Paolo