All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eduardo Habkost <ehabkost@redhat.com>
To: "Marc-André Lureau" <marcandre.lureau@redhat.com>
Cc: qemu-devel@nongnu.org, imammedo@redhat.com
Subject: Re: [Qemu-devel] [PATCH v4 2/3] Add memfd based hostmem
Date: Fri, 23 Jun 2017 18:08:45 -0300	[thread overview]
Message-ID: <20170623210845.GA10776@localhost.localdomain> (raw)
In-Reply-To: <20170621140219.4568-3-marcandre.lureau@redhat.com>

On Wed, Jun 21, 2017 at 04:02:18PM +0200, Marc-André Lureau wrote:
> Add a new memory backend, similar to hostmem-file, except that it
> doesn't need to create files. It also enforces memory sealing.
> 
> This backend is mainly useful for sharing the memory with other
> processes.

How exactly can the memfd be used to share memory?  Is there an existing
mechanism for sharing the memfd file descriptor with another process?


> 
> Note that Linux supports transparent huge-pages of shmem/memfd memory
> since 4.8. It is relatively easier to set up THP than a dedicate
> hugepage mount point by using "madvise" in
> /sys/kernel/mm/transparent_hugepage/shmem_enabled.
> 
> Usage:
> -object memory-backend-memfd,id=mem1,size=1G
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  backends/hostmem-memfd.c | 67 ++++++++++++++++++++++++++++++++++++++++++++++++
>  backends/Makefile.objs   |  2 ++
>  qemu-options.hx          | 11 ++++++++
>  3 files changed, 80 insertions(+)
>  create mode 100644 backends/hostmem-memfd.c
> 
[...]

-- 
Eduardo

  reply	other threads:[~2017-06-23 21:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-21 14:02 [Qemu-devel] [PATCH v4 0/3] Add memfd memory backend Marc-André Lureau
2017-06-21 14:02 ` [Qemu-devel] [PATCH v4 1/3] memfd: split qemu_memfd_alloc() Marc-André Lureau
2017-06-21 14:02 ` [Qemu-devel] [PATCH v4 2/3] Add memfd based hostmem Marc-André Lureau
2017-06-23 21:08   ` Eduardo Habkost [this message]
2017-06-27  8:23     ` Marc-André Lureau
2017-06-28 18:29       ` Eduardo Habkost
2017-06-29 13:34         ` Marc-André Lureau
2017-07-03 14:34           ` Eduardo Habkost
2017-06-21 14:02 ` [Qemu-devel] [PATCH v4 3/3] tests: use memfd in vhost-user-test Marc-André Lureau
2017-06-22  9:58 ` [Qemu-devel] [PATCH v4 0/3] Add memfd memory backend David Hildenbrand
2017-06-23 11:29   ` Eduardo Habkost

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=20170623210845.GA10776@localhost.localdomain \
    --to=ehabkost@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.