[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [RFC v2 02/16] qemu: add memfd memory backing



On Tue, Aug 28, 2018 at 11:39:20PM +0200, marcandre lureau redhat com wrote:
> From: Marc-André Lureau <marcandre lureau redhat com>
> 
> Add a new memoryBacking source type "memfd", support by QEMU (when the
> capability is available).
> 
> Sealing is enabled by default in qemu, and hugepage is easier to
> setup, which makes it often a better choice than memory-backend-file.
> 
> Signed-off-by: Marc-André Lureau <marcandre lureau redhat com>
> ---
>  docs/formatdomain.html.in                     |  8 ++-
>  docs/schemas/domaincommon.rng                 |  1 +
>  src/conf/domain_conf.c                        |  3 +-
>  src/conf/domain_conf.h                        |  1 +
>  src/qemu/qemu_command.c                       | 62 +++++++++++++------
>  tests/qemuxml2argvdata/memfd-memory-numa.args | 27 ++++++++
>  tests/qemuxml2argvdata/memfd-memory-numa.xml  | 33 ++++++++++
>  tests/qemuxml2argvtest.c                      |  3 +
>  8 files changed, 116 insertions(+), 22 deletions(-)
>  create mode 100644 tests/qemuxml2argvdata/memfd-memory-numa.args
>  create mode 100644 tests/qemuxml2argvdata/memfd-memory-numa.xml
> 
> diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
> index eb619a1656..ca656c9f7e 100644
> --- a/docs/formatdomain.html.in
> +++ b/docs/formatdomain.html.in
> @@ -1099,7 +1099,7 @@
>      &lt;/hugepages&gt;
>      &lt;nosharepages/&gt;
>      &lt;locked/&gt;
> -    &lt;source type="file|anonymous"/&gt;
> +    &lt;source type="file|anonymous|memfd"/&gt;

IIUC memfd is really just a different way to implement anonymous memory
backing. Why do we need to expose this in the XML, as opposed to just
using it automatically when we find it is available ?  This would be
preferrable as then applications don't need changing to make use of
this.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]