Received: from eggs.gnu.org ([2001:4830:134:3::10]:37802) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VsaOT-0005M7-2k for qemu-devel@nongnu.org; Mon, 16 Dec 2013 10:47:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VsaOO-0006xq-Rx for qemu-devel@nongnu.org; Mon, 16 Dec 2013 10:47:41 -0500 Received: from mx1.redhat.com ([209.132.183.28]:11706) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VsaOO-0006vQ-K9 for qemu-devel@nongnu.org; Mon, 16 Dec 2013 10:47:36 -0500 Date: Mon, 16 Dec 2013 16:47:25 +0100 From: Igor Mammedov Message-ID: <20131216164725.7ed7cae1@nial.usersys.redhat.com> In-Reply-To: References: <1386933277-20003-1-git-send-email-a.motakis@virtualopensystems.com> <1386933277-20003-2-git-send-email-a.motakis@virtualopensystems.com> <52ABD64C.6060507@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 1/7] Add -mem-share option List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Antonios Motakis Cc: Peter Maydell , snabb-devel@googlegroups.com, Stefan Hajnoczi , Juan Quintela , Jan Kiszka , Michael Tokarev , qemu-devel qemu-devel , Nikolay Nikolaev , Markus Armbruster , Orit Wasserman , Anthony Liguori , Luke Gorrie , Paolo Bonzini , VirtualOpenSystems Technical Team , Andreas =?ISO-8859-1?B?RuRyYmVy?= , Richard Henderson On Mon, 16 Dec 2013 16:20:04 +0100 Antonios Motakis wrote: > On Sat, Dec 14, 2013 at 4:53 AM, Eric Blake wrote: > > > On 12/13/2013 04:14 AM, Antonios Motakis wrote: > > > This option complements -mem-path. It implies -mem-prealloc. If > > specified, > > > the guest RAM is allocated as a shared memory object. If both -mem-path > > > and -mem-share are provided, the memory is allocated from the HugeTLBFS > > > supplied path, and then mmapped with MAP_SHARED. > > > > > > Signed-off-by: Antonios Motakis > > > Signed-off-by: Nikolay Nikolaev > > > --- > > > > > +++ b/qemu-options.hx > > > @@ -237,6 +237,15 @@ STEXI > > > Preallocate memory when using -mem-path. > > > ETEXI > > > > > > +DEF("mem-share", 0, QEMU_OPTION_mem_share, > > > > Ouch. Doesn't this mean you are defining a boolean option (absent or > > present) as opposed to a qemuOpts option? I've already been complaining > > that other boolean opts are currently undiscoverable to QMP; they also > > have the drawback of having no way to turn the option back off if an > > alias turned it on earlier in the command line. Can we use qemuOpts > > here (so query-command-line-options can see it), and with a boolean > > on/off argument (so it's not a one-way switch)? > > > > Our implementation of mem-share complements mem-path and mem-prealloc. > Maybe these options should be combined as one QemuOpts with arguments? > Is this the memdev that is referred to by Paolo? memdev is introduced here: http://lists.gnu.org/archive/html/qemu-devel/2013-11/msg02532.html as for mem-path & mem-prealloc, I was thinking about adding HugePageMem backend to handle hugepage specifics. mem-share could be a part of ShareMem backend or something like this. > > > > -- > > Eric Blake eblake redhat com +1-919-301-3266 > > Libvirt virtualization library http://libvirt.org > > > >