[libvirt PATCH] docs: virtiofs: describe memfd memory backend

Stefan Hajnoczi posted 1 patch 2 years, 10 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20210607135024.99928-1-stefanha@gmail.com
docs/kbase/virtiofs.rst | 21 +++++++++++++++++++--
1 file changed, 19 insertions(+), 2 deletions(-)
[libvirt PATCH] docs: virtiofs: describe memfd memory backend
Posted by Stefan Hajnoczi 2 years, 10 months ago
Nowadays memfd is the most convenient memory backend for vhost-user
devices. Compared to file-backend memory and hugepages, there is no need
to worry about configuring the location of the shm directory or
allocating hugepages.

Cc: Michal Prívozník <mprivozn@redhat.com>
Cc: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
---
 docs/kbase/virtiofs.rst | 21 +++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)

diff --git a/docs/kbase/virtiofs.rst b/docs/kbase/virtiofs.rst
index 740b08d50d..8cf7567bf8 100644
--- a/docs/kbase/virtiofs.rst
+++ b/docs/kbase/virtiofs.rst
@@ -29,7 +29,11 @@ NUMA. As of QEMU 5.0.0 and libvirt 6.9.0, it is possible to
 specify the memory backend without NUMA (using the so called
 memobject interface).
 
-Either of the following:
+One of the following:
+
+* Use memfd memory
+
+  No host setup is required when using the Linux memfd memory backend.
 
 * Use file-backed memory
 
@@ -75,7 +79,20 @@ Guest setup
 
 #. Specify the memory backend
 
-   Either of the following:
+   One of the following:
+
+   * memfd memory
+
+     ::
+
+        <domain>
+          ...
+          <memoryBacking>
+            <source type='memfd'/>
+            <access mode='shared'/>
+          </memoryBacking>
+          ...
+        </domain>
 
    * File-backed memory
 
-- 
2.31.1


Re: [libvirt PATCH] docs: virtiofs: describe memfd memory backend
Posted by Michal Prívozník 2 years, 10 months ago
On 6/7/21 3:50 PM, Stefan Hajnoczi wrote:
> Nowadays memfd is the most convenient memory backend for vhost-user
> devices. Compared to file-backend memory and hugepages, there is no need
> to worry about configuring the location of the shm directory or
> allocating hugepages.
> 
> Cc: Michal Prívozník <mprivozn@redhat.com>
> Cc: Ján Tomko <jtomko@redhat.com>
> Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
> ---
>  docs/kbase/virtiofs.rst | 21 +++++++++++++++++++--
>  1 file changed, 19 insertions(+), 2 deletions(-)

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>

and pushed.

Michal