From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41054) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WuI25-0003FM-59 for qemu-devel@nongnu.org; Tue, 10 Jun 2014 05:07:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WuI20-0006Ul-IF for qemu-devel@nongnu.org; Tue, 10 Jun 2014 05:07:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56419) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WuI20-0006Ud-7b for qemu-devel@nongnu.org; Tue, 10 Jun 2014 05:07:48 -0400 Date: Tue, 10 Jun 2014 11:07:35 +0200 From: Igor Mammedov Message-ID: <20140610110735.5f378e47@thinkpad> In-Reply-To: <20140610083006.GA12425@G08FNSTD100614.fnst.cn.fujitsu.com> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII 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 , Paolo Bonzini , "Michael S. Tsirkin" , qemu-devel@nongnu.org, Eduardo Habkost On Tue, 10 Jun 2014 16:30:06 +0800 Hu Tao wrote: > 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? > > 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? I was too hasty with this suggestion, looking again at behind scenes file_ram_alloc(), for now it works only with THP /gethugepagesize()/ but it could be modified to run on non linux hosts as well and take /dev/shm or just any file on host as backing storage. > > Regards, > Hu -- Regards, Igor