aboutsummaryrefslogtreecommitdiff
path: root/qemu-options.hx
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2017-08-24 16:23:15 -0300
committerEduardo Habkost <ehabkost@redhat.com>2017-09-19 09:09:23 -0300
commit11ae6ed8affdd131e735bac39b21e7d3cde66f7b (patch)
tree8d566e05954e76f90df30bf1d1f3ee38de7509bb /qemu-options.hx
parent0f81d3353029d26c6f8731a65d8052c532b1ced6 (diff)
hostmem-file: Add "discard-data" option
The new option can be used to indicate that the file contents can be destroyed and don't need to be flushed to disk when QEMU exits or when the memory backend object is removed. Internally, it will trigger a madvise(MADV_REMOVE) call when the memory backend is removed. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20170824192315.5897-4-ehabkost@redhat.com> [ehabkost: fixup: improved documentation] Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Tested-by: Zack Cornelius <zack.cornelius@kove.net> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'qemu-options.hx')
-rw-r--r--qemu-options.hx8
1 files changed, 7 insertions, 1 deletions
diff --git a/qemu-options.hx b/qemu-options.hx
index 600614f6e5..77859a248c 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -4182,7 +4182,7 @@ property must be set. These objects are placed in the
@table @option
-@item -object memory-backend-file,id=@var{id},size=@var{size},mem-path=@var{dir},share=@var{on|off}
+@item -object memory-backend-file,id=@var{id},size=@var{size},mem-path=@var{dir},share=@var{on|off},discard-data=@var{on|off}
Creates a memory file backend object, which can be used to back
the guest RAM with huge pages. The @option{id} parameter is a
@@ -4194,6 +4194,12 @@ the path to either a shared memory or huge page filesystem mount.
The @option{share} boolean option determines whether the memory
region is marked as private to QEMU, or shared. The latter allows
a co-operating external process to access the QEMU memory region.
+Setting the @option{discard-data} boolean option to @var{on}
+indicates that file contents can be destroyed when QEMU exits,
+to avoid unnecessarily flushing data to the backing file. Note
+that @option{discard-data} is only an optimization, and QEMU
+might not discard file contents if it aborts unexpectedly or is
+terminated using SIGKILL.
@item -object rng-random,id=@var{id},filename=@var{/dev/random}