[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 13/14] qmp: Include "reserve" property of memory backends
From: |
Markus Armbruster |
Subject: |
Re: [PATCH v4 13/14] qmp: Include "reserve" property of memory backends |
Date: |
Fri, 19 Mar 2021 16:40:08 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
David Hildenbrand <david@redhat.com> writes:
> Let's include the new property.
>
> Cc: Eric Blake <eblake@redhat.com>
> Cc: Markus Armbruster <armbru@redhat.com>
> Signed-off-by: David Hildenbrand <david@redhat.com>
> ---
> hw/core/machine-qmp-cmds.c | 1 +
> qapi/machine.json | 6 ++++++
> 2 files changed, 7 insertions(+)
>
> diff --git a/hw/core/machine-qmp-cmds.c b/hw/core/machine-qmp-cmds.c
> index 68a942595a..bd2a7f2dd0 100644
> --- a/hw/core/machine-qmp-cmds.c
> +++ b/hw/core/machine-qmp-cmds.c
> @@ -174,6 +174,7 @@ static int query_memdev(Object *obj, void *opaque)
> m->merge = object_property_get_bool(obj, "merge", &error_abort);
> m->dump = object_property_get_bool(obj, "dump", &error_abort);
> m->prealloc = object_property_get_bool(obj, "prealloc",
> &error_abort);
> + m->reserve = object_property_get_bool(obj, "reserve", &error_abort);
> m->policy = object_property_get_enum(obj, "policy", "HostMemPolicy",
> &error_abort);
> host_nodes = object_property_get_qobject(obj,
> diff --git a/qapi/machine.json b/qapi/machine.json
> index c0c52aef10..12860a1f79 100644
> --- a/qapi/machine.json
> +++ b/qapi/machine.json
> @@ -814,6 +814,11 @@
> #
> # @prealloc: enables or disables memory preallocation
> #
> +# @reserve: enables or disables reservation of swap space (or huge pages
> +# if applicable). If reservation is enabled (default), actual
> +# reservation depends on underlying OS support. In contrast,
> +# disabling reservation without OS support will bail out. (since
> 6.1)
> +#
Provides two settings: "enable reservation if possible", and "disable
reservation or else fail".
Does "enable reservation or else fail" make no sense, or is it merely
unimplemented?
> # @host-nodes: host nodes for its memory policy
> #
> # @policy: memory policy of memory backend
> @@ -827,6 +832,7 @@
> 'merge': 'bool',
> 'dump': 'bool',
> 'prealloc': 'bool',
> + 'reserve': 'bool',
> 'host-nodes': ['uint16'],
> 'policy': 'HostMemPolicy' }}
- [PATCH v4 08/14] softmmu/memory: Pass ram_flags to memory_region_init_ram_shared_nomigrate(), (continued)
- [PATCH v4 08/14] softmmu/memory: Pass ram_flags to memory_region_init_ram_shared_nomigrate(), David Hildenbrand, 2021/03/19
- [PATCH v4 09/14] util/mmap-alloc: Pass flags instead of separate bools to qemu_ram_mmap(), David Hildenbrand, 2021/03/19
- [PATCH v4 10/14] memory: Introduce RAM_NORESERVE and wire it up in qemu_ram_mmap(), David Hildenbrand, 2021/03/19
- [PATCH v4 11/14] util/mmap-alloc: Support RAM_NORESERVE via MAP_NORESERVE under Linux, David Hildenbrand, 2021/03/19
- [PATCH v4 12/14] hostmem: Wire up RAM_NORESERVE via "reserve" property, David Hildenbrand, 2021/03/19
- [PATCH v4 13/14] qmp: Include "reserve" property of memory backends, David Hildenbrand, 2021/03/19
- Re: [PATCH v4 13/14] qmp: Include "reserve" property of memory backends,
Markus Armbruster <=
[PATCH v4 14/14] hmp: Print "reserve" property of memory backends with "info memdev", David Hildenbrand, 2021/03/19