From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38426) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WuHs3-0006q5-6X for qemu-devel@nongnu.org; Tue, 10 Jun 2014 04:57:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WuHrw-0001zM-Ls for qemu-devel@nongnu.org; Tue, 10 Jun 2014 04:57:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:3107) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WuHrw-0001zE-Dp for qemu-devel@nongnu.org; Tue, 10 Jun 2014 04:57:24 -0400 Message-ID: <5396C84A.8030202@redhat.com> Date: Tue, 10 Jun 2014 10:56:42 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <988dc97c3b3e3c89066b3b3dc8c17b3fccc3c816.1402299637.git.hutao@cn.fujitsu.com> <20140609133246.286d749c@thinkpad> <20140610020021.GD29724@G08FNSTD100614.fnst.cn.fujitsu.com> <480968011.20454430.1402376972892.JavaMail.zimbra@redhat.com> <20140610083006.GA12425@G08FNSTD100614.fnst.cn.fujitsu.com> In-Reply-To: <20140610083006.GA12425@G08FNSTD100614.fnst.cn.fujitsu.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v4 18/29] hostmem: add file-based HostMemoryBackend List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Hu Tao Cc: Yasunori Goto , Igor Mammedov , "Michael S. Tsirkin" , qemu-devel@nongnu.org, Eduardo Habkost Il 10/06/2014 10:30, Hu Tao ha scritto: > On Tue, Jun 10, 2014 at 01:09:32AM -0400, Paolo Bonzini wrote: >> >>>>> +#define TYPE_MEMORY_BACKEND_FILE "memory-backend-file" >>>> how about naming it after what it really is? "memory-backend-hugepage" >>>> Later we could split it into generic superclass mmap-ed >>>> "memory-backend-file" and have TPH specific code moved into this backend. >>> >>> OK. >> >> Actually I don't think there's anything hugepage-specific in this backend >> (except perhaps passing a path instead of a filename). It could be used >> with a tmpfs backing storage like /dev/shm. > > What's the point compared to memory-backend-ram? That you can use shared memory, for example together with vhost-user. > Igor suggested memory-backend-file be compiled only for Linux. Does this mean > memory-backend-file shuold be compiled also for systems supporting tmpfs > or like? Yes, I think it should be compiled on all POSIX systems. But it can be done later. Paolo