From: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
To: Antonios Motakis <a.motakis@virtualopensystems.com>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
snabb-devel@googlegroups.com,
"Anthony Liguori" <aliguori@amazon.com>,
"Juan Quintela" <quintela@redhat.com>,
"Jan Kiszka" <jan.kiszka@siemens.com>,
"Michael Tokarev" <mjt@tls.msk.ru>,
"qemu-devel qemu-devel" <qemu-devel@nongnu.org>,
"Nikolay Nikolaev" <n.nikolaev@virtualopensystems.com>,
"Markus Armbruster" <armbru@redhat.com>,
"Orit Wasserman" <owasserm@redhat.com>,
"Stefan Hajnoczi" <stefanha@redhat.com>,
"Luke Gorrie" <lukego@gmail.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"VirtualOpenSystems Technical Team" <tech@virtualopensystems.com>,
"Andreas Färber" <afaerber@suse.de>,
"Richard Henderson" <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH v3 1/7] Add -mem-share option
Date: Tue, 17 Dec 2013 11:55:32 +1000 [thread overview]
Message-ID: <20131217015532.GK2161@edvb> (raw)
In-Reply-To: <CAG8rG2xqDCS7NgcMhfPNaZtK6afZwytq4Nfk8Oy-fUQeKUitkA@mail.gmail.com>
On Mon, Dec 16, 2013 at 04:21:28PM +0100, Antonios Motakis wrote:
> On Mon, Dec 16, 2013 at 8:32 AM, Edgar E. Iglesias
> <edgar.iglesias@gmail.com> wrote:
>
> On Fri, Dec 13, 2013 at 12:14:31PM +0100, 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.
>
> Hi,
>
> Interesting, I've got a similar use-case here where I've added a
> -mem-shared
> option. I've got a few comments/questions.
>
> Why do you imply -mem-prealloc? cant the user keep controlling that
> through
> -mem-prealloc?
>
> I'd prefer if -mem-share did not use shm_open but took a directory path
> as arg
> and created the backing files there. I'd also prefer if the files had
> deterministic names and where not unlinked after creation. I.e, let the
> user
> delete them when no longer needed.
>
> The reason for this is that it makes it easier to use apps that are not
> aware of shm or QEMU specifics to manipulate the memory backing. I
> understand
> that there might be issues (e.g filling up the disk, slow access over
> NFS etc)
> but these are at the choice of the user.
>
> Currently -mem-path implies HugeTLBFS for the supplied path. Maybe we
> should change
> its behavior to do what you suggest:
>
> -mem-path - specify a directory where to allocate the mmap-ed ram files
> (and don't unlink them)
> -mem-hugetlbfs - check mem-path directory for HugeTLBFS (do we need this
> one?)
> -mem-share - add MAP_SHARED to mmap
> -mem-prealloc - preallocate the memory
> How does this sound?
It sounds good to me, but I'm not sure its a good thing to change the
behaviour of -mem-path and break backwards compatibility. Maybe we
could relax the hugetlbfs impl for -mem-path in that it uses it the
huge page sizes if the underlying fs is hugetlbfs and otherwise not?
In my local implementation mem-share takes an argument by itself and replaces
the need for -mem-path, not very intuitive I agree but its an alternative.
Cheers,
Edgar
next prev parent reply other threads:[~2013-12-17 1:56 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-13 11:14 [Qemu-devel] [PATCH v3 0/7] host and vhost-net support for userspace based backends Antonios Motakis
2013-12-13 11:14 ` [Qemu-devel] [PATCH v3 1/7] Add -mem-share option Antonios Motakis
2013-12-14 3:53 ` Eric Blake
2013-12-14 11:09 ` [Qemu-devel] [snabb-devel:650] " Paolo Bonzini
2013-12-16 15:20 ` [Qemu-devel] " Antonios Motakis
2013-12-16 15:47 ` Igor Mammedov
2013-12-17 11:11 ` Paolo Bonzini
2013-12-16 7:32 ` Edgar E. Iglesias
2013-12-16 10:17 ` Paolo Bonzini
2013-12-16 15:21 ` Antonios Motakis
2013-12-17 1:55 ` Edgar E. Iglesias [this message]
2013-12-13 11:14 ` [Qemu-devel] [PATCH v3 2/7] Decouple vhost from kernel interface Antonios Motakis
2013-12-13 11:14 ` [Qemu-devel] [PATCH v3 3/7] Add vhost-user skeleton Antonios Motakis
2013-12-13 11:14 ` [Qemu-devel] [PATCH v3 4/7] Add domain socket communication for vhost-user backend Antonios Motakis
2013-12-13 11:14 ` [Qemu-devel] [PATCH v3 5/7] Add vhost-user calls implementation Antonios Motakis
2013-12-16 9:15 ` Luke Gorrie
2013-12-13 11:14 ` [Qemu-devel] [PATCH v3 6/7] Add new vhost-user netdev backend Antonios Motakis
2013-12-13 11:14 ` [Qemu-devel] [PATCH v3 7/7] Add vhost-user reconnection Antonios Motakis
2013-12-16 9:17 ` Luke Gorrie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131217015532.GK2161@edvb \
--to=edgar.iglesias@gmail.com \
--cc=a.motakis@virtualopensystems.com \
--cc=afaerber@suse.de \
--cc=aliguori@amazon.com \
--cc=armbru@redhat.com \
--cc=jan.kiszka@siemens.com \
--cc=lukego@gmail.com \
--cc=mjt@tls.msk.ru \
--cc=n.nikolaev@virtualopensystems.com \
--cc=owasserm@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=rth@twiddle.net \
--cc=snabb-devel@googlegroups.com \
--cc=stefanha@redhat.com \
--cc=tech@virtualopensystems.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).