From: David Gibson <david@gibson.dropbear.id.au>
To: Igor Mammedov <imammedo@redhat.com>
Cc: peter.maydell@linaro.org, ehabkost@redhat.com, mst@redhat.com,
libvir-list@redhat.com, qemu-devel@nongnu.org,
qemu-arm@nongnu.org, qemu-ppc@nongnu.org,
marcel.apfelbaum@gmail.com, pbonzini@redhat.com, rth@twiddle.net
Subject: Re: [PATCH v2 82/86] numa: forbid '-numa node, mem' for 5.0 and newer machine types
Date: Thu, 16 Jan 2020 14:36:08 +1000 [thread overview]
Message-ID: <20200116043608.GP54439@umbus> (raw)
In-Reply-To: <1579100861-73692-83-git-send-email-imammedo@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 7488 bytes --]
On Wed, Jan 15, 2020 at 04:07:37PM +0100, Igor Mammedov wrote:
> Deprecation period is ran out and it's a time to flip the switch
> introduced by cd5ff8333a.
> Disable legacy option for new machine types and amend documentation.
>
> Signed-off-by: Igor Mammedov <imammedo@redhat.com>
ppc parts
Acked-by: David Gibson <david@gibson.dropbear.id.au>
> ---
> CC: peter.maydell@linaro.org
> CC: ehabkost@redhat.com
> CC: marcel.apfelbaum@gmail.com
> CC: mst@redhat.com
> CC: pbonzini@redhat.com
> CC: rth@twiddle.net
> CC: david@gibson.dropbear.id.au
> CC: libvir-list@redhat.com
> CC: qemu-arm@nongnu.org
> CC: qemu-ppc@nongnu.org
> ---
> hw/arm/virt.c | 2 +-
> hw/core/numa.c | 6 ++++++
> hw/i386/pc.c | 1 -
> hw/i386/pc_piix.c | 1 +
> hw/i386/pc_q35.c | 1 +
> hw/ppc/spapr.c | 2 +-
> qemu-deprecated.texi | 16 ----------------
> qemu-options.hx | 8 ++++----
> 8 files changed, 14 insertions(+), 23 deletions(-)
>
> diff --git a/hw/arm/virt.c b/hw/arm/virt.c
> index e2fbca3..49de0d8 100644
> --- a/hw/arm/virt.c
> +++ b/hw/arm/virt.c
> @@ -2049,7 +2049,6 @@ static void virt_machine_class_init(ObjectClass *oc, void *data)
> hc->pre_plug = virt_machine_device_pre_plug_cb;
> hc->plug = virt_machine_device_plug_cb;
> hc->unplug_request = virt_machine_device_unplug_request_cb;
> - mc->numa_mem_supported = true;
> mc->auto_enable_numa_with_memhp = true;
> mc->default_ram_id = "mach-virt.ram";
> }
> @@ -2153,6 +2152,7 @@ DEFINE_VIRT_MACHINE_AS_LATEST(5, 0)
> static void virt_machine_4_2_options(MachineClass *mc)
> {
> compat_props_add(mc->compat_props, hw_compat_4_2, hw_compat_4_2_len);
> + mc->numa_mem_supported = true;
> }
> DEFINE_VIRT_MACHINE(4, 2)
>
> diff --git a/hw/core/numa.c b/hw/core/numa.c
> index 0970a30..3177066 100644
> --- a/hw/core/numa.c
> +++ b/hw/core/numa.c
> @@ -117,6 +117,12 @@ static void parse_numa_node(MachineState *ms, NumaNodeOptions *node,
> }
>
> if (node->has_mem) {
> + if (!mc->numa_mem_supported) {
> + error_setg(errp, "Parameter -numa node,mem is not supported by this"
> + " machine type. Use -numa node,memdev instead");
> + return;
> + }
> +
> numa_info[nodenr].node_mem = node->mem;
> if (!qtest_enabled()) {
> warn_report("Parameter -numa node,mem is deprecated,"
> diff --git a/hw/i386/pc.c b/hw/i386/pc.c
> index 21b8290..fa8d024 100644
> --- a/hw/i386/pc.c
> +++ b/hw/i386/pc.c
> @@ -1947,7 +1947,6 @@ static void pc_machine_class_init(ObjectClass *oc, void *data)
> hc->unplug = pc_machine_device_unplug_cb;
> mc->default_cpu_type = TARGET_DEFAULT_CPU_TYPE;
> mc->nvdimm_supported = true;
> - mc->numa_mem_supported = true;
> mc->default_ram_id = "pc.ram";
>
> object_class_property_add(oc, PC_MACHINE_DEVMEM_REGION_SIZE, "int",
> diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
> index fa12203..0a9b9e0 100644
> --- a/hw/i386/pc_piix.c
> +++ b/hw/i386/pc_piix.c
> @@ -435,6 +435,7 @@ static void pc_i440fx_4_2_machine_options(MachineClass *m)
> pc_i440fx_5_0_machine_options(m);
> m->alias = NULL;
> m->is_default = 0;
> + m->numa_mem_supported = true;
> compat_props_add(m->compat_props, hw_compat_4_2, hw_compat_4_2_len);
> compat_props_add(m->compat_props, pc_compat_4_2, pc_compat_4_2_len);
> }
> diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
> index 84cf925..4d6e2be 100644
> --- a/hw/i386/pc_q35.c
> +++ b/hw/i386/pc_q35.c
> @@ -363,6 +363,7 @@ static void pc_q35_4_2_machine_options(MachineClass *m)
> {
> pc_q35_5_0_machine_options(m);
> m->alias = NULL;
> + m->numa_mem_supported = true;
> compat_props_add(m->compat_props, hw_compat_4_2, hw_compat_4_2_len);
> compat_props_add(m->compat_props, pc_compat_4_2, pc_compat_4_2_len);
> }
> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> index bcbe1f1..2686b73 100644
> --- a/hw/ppc/spapr.c
> +++ b/hw/ppc/spapr.c
> @@ -4383,7 +4383,6 @@ static void spapr_machine_class_init(ObjectClass *oc, void *data)
> * in which LMBs are represented and hot-added
> */
> mc->numa_mem_align_shift = 28;
> - mc->numa_mem_supported = true;
> mc->auto_enable_numa = true;
>
> smc->default_caps.caps[SPAPR_CAP_HTM] = SPAPR_CAP_OFF;
> @@ -4465,6 +4464,7 @@ static void spapr_machine_4_2_class_options(MachineClass *mc)
> {
> spapr_machine_5_0_class_options(mc);
> compat_props_add(mc->compat_props, hw_compat_4_2, hw_compat_4_2_len);
> + mc->numa_mem_supported = true;
> }
>
> DEFINE_SPAPR_MACHINE(4_2, "4.2", false);
> diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi
> index 982af95..17a0e1d 100644
> --- a/qemu-deprecated.texi
> +++ b/qemu-deprecated.texi
> @@ -89,22 +89,6 @@ error in the future.
> The @code{-realtime mlock=on|off} argument has been replaced by the
> @code{-overcommit mem-lock=on|off} argument.
>
> -@subsection -numa node,mem=@var{size} (since 4.1)
> -
> -The parameter @option{mem} of @option{-numa node} is used to assign a part of
> -guest RAM to a NUMA node. But when using it, it's impossible to manage specified
> -RAM chunk on the host side (like bind it to a host node, setting bind policy, ...),
> -so guest end-ups with the fake NUMA configuration with suboptiomal performance.
> -However since 2014 there is an alternative way to assign RAM to a NUMA node
> -using parameter @option{memdev}, which does the same as @option{mem} and adds
> -means to actualy manage node RAM on the host side. Use parameter @option{memdev}
> -with @var{memory-backend-ram} backend as an replacement for parameter @option{mem}
> -to achieve the same fake NUMA effect or a properly configured
> -@var{memory-backend-file} backend to actually benefit from NUMA configuration.
> -In future new machine versions will not accept the option but it will still
> -work with old machine types. User can check QAPI schema to see if the legacy
> -option is supported by looking at MachineInfo::numa-mem-supported property.
> -
> @subsection -numa node (without memory specified) (since 4.1)
>
> Splitting RAM by default between NUMA nodes has the same issues as @option{mem}
> diff --git a/qemu-options.hx b/qemu-options.hx
> index 709162c..55500bd 100644
> --- a/qemu-options.hx
> +++ b/qemu-options.hx
> @@ -223,10 +223,10 @@ For example:
> -numa cpu,node-id=0,socket-id=0 -numa cpu,node-id=1,socket-id=1
> @end example
>
> -@samp{mem} assigns a given RAM amount to a node. @samp{memdev}
> -assigns RAM from a given memory backend device to a node. If
> -@samp{mem} and @samp{memdev} are omitted in all nodes, RAM is
> -split equally between them.
> +Legacy @samp{mem} assigns a given RAM amount to a node (not supported for 5.0
> +and newer machine types). @samp{memdev} assigns RAM from a given memory backend
> +device to a node. If @samp{mem} and @samp{memdev} are omitted in all nodes, RAM
> +is split equally between them.
>
> @samp{mem} and @samp{memdev} are mutually exclusive. Furthermore,
> if one node uses @samp{memdev}, all of them have to use it.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2020-01-16 4:39 UTC|newest]
Thread overview: 68+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1579100861-73692-1-git-send-email-imammedo@redhat.com>
2020-01-15 15:06 ` [PATCH v2 07/86] arm:aspeed: convert valid RAM sizes to data Igor Mammedov
2020-01-16 1:45 ` Joel Stanley
2020-01-15 15:06 ` [PATCH v2 08/86] arm:aspeed: actually check RAM size Igor Mammedov
2020-01-16 8:41 ` Cédric Le Goater
2020-01-16 17:35 ` Igor Mammedov
2020-01-17 7:56 ` Cédric Le Goater
2020-01-20 14:21 ` [PATCH v3 07/84] hw/arm/aspeed: " Igor Mammedov
2020-01-20 15:33 ` Cédric Le Goater
2020-01-15 15:06 ` [PATCH v2 09/86] hw:aspeed: drop warning and bogus ram_size fixup Igor Mammedov
2020-01-15 15:06 ` [PATCH v2 10/86] arm:aspeed: use memdev for RAM Igor Mammedov
2020-01-15 19:19 ` Philippe Mathieu-Daudé
2020-01-16 9:24 ` Cédric Le Goater
2020-01-16 18:17 ` Philippe Mathieu-Daudé
2020-01-15 15:06 ` [PATCH v2 11/86] arm:collie: " Igor Mammedov
2020-01-15 15:06 ` [PATCH v2 12/86] arm:cubieboard: " Igor Mammedov
2020-01-15 15:06 ` [PATCH v2 13/86] arm:digic_boards: " Igor Mammedov
2020-01-15 15:06 ` [PATCH v2 14/86] arm:highbank: " Igor Mammedov
2020-01-15 19:18 ` Philippe Mathieu-Daudé
2020-01-15 15:06 ` [PATCH v2 15/86] arm:imx25_pdk: drop RAM size fixup Igor Mammedov
2020-01-15 15:06 ` [PATCH v2 16/86] arm:imx25_pdk: use memdev for RAM Igor Mammedov
2020-01-15 19:18 ` Philippe Mathieu-Daudé
2020-01-15 15:06 ` [PATCH v2 17/86] arm:integratorcp: " Igor Mammedov
2020-01-15 15:06 ` [PATCH v2 18/86] arm:kzm: drop RAM size fixup Igor Mammedov
2020-01-15 19:58 ` Chubb, Peter (Data61, Kensington NSW)
2020-01-16 17:26 ` [PATCH v3 " Igor Mammedov
2020-01-16 18:22 ` Philippe Mathieu-Daudé
2020-01-17 9:50 ` Igor Mammedov
2020-01-17 13:07 ` Philippe Mathieu-Daudé
2020-01-15 15:06 ` [PATCH v2 19/86] arm:kzm: use memdev for RAM Igor Mammedov
2020-01-15 20:09 ` Chubb, Peter (Data61, Kensington NSW)
2020-01-15 15:06 ` [PATCH v2 20/86] arm:mcimx6ul-evk: " Igor Mammedov
2020-01-15 15:06 ` [PATCH v2 21/86] arm:mcimx7d-sabre: " Igor Mammedov
2020-01-15 15:06 ` [PATCH v2 22/86] arm:mps2-tz: " Igor Mammedov
2020-01-15 15:06 ` [PATCH v2 23/86] arm:mps2: " Igor Mammedov
2020-01-15 15:06 ` [PATCH v2 24/86] arm:musicpal: " Igor Mammedov
2020-01-15 15:06 ` [PATCH v2 25/86] arm:nseries: " Igor Mammedov
2020-01-15 15:06 ` [PATCH v2 26/86] arm:omap_sx1: " Igor Mammedov
2020-01-15 15:06 ` [PATCH v2 27/86] arm:palm: " Igor Mammedov
2020-01-15 15:06 ` [PATCH v2 28/86] arm:raspi: " Igor Mammedov
2020-01-15 19:07 ` Philippe Mathieu-Daudé
2020-01-16 16:55 ` Igor Mammedov
2020-01-15 15:06 ` [PATCH v2 29/86] arm:sabrelite: " Igor Mammedov
2020-01-15 15:06 ` [PATCH v2 30/86] arm:sbsa-ref: " Igor Mammedov
2020-01-15 19:09 ` Philippe Mathieu-Daudé
2020-01-15 15:06 ` [PATCH v2 31/86] arm:versatilepb: " Igor Mammedov
2020-01-15 19:20 ` Philippe Mathieu-Daudé
2020-01-15 15:06 ` [PATCH v2 32/86] arm:vexpress: " Igor Mammedov
2020-01-15 19:21 ` Philippe Mathieu-Daudé
2020-01-15 15:06 ` [PATCH v2 33/86] arm:virt: " Igor Mammedov
2020-01-15 18:57 ` Philippe Mathieu-Daudé
2020-01-15 15:06 ` [PATCH v2 34/86] arm:xilinx_zynq: drop RAM size fixup Igor Mammedov
2020-01-15 22:59 ` Alistair Francis
2020-01-15 15:06 ` [PATCH v2 35/86] arm:xilinx_zynq: use memdev for RAM Igor Mammedov
2020-01-15 19:01 ` Philippe Mathieu-Daudé
2020-01-16 0:20 ` Alistair Francis
2020-01-15 15:06 ` [PATCH v2 37/86] arm:xlnx-zcu102: " Igor Mammedov
2020-01-15 19:21 ` Philippe Mathieu-Daudé
2020-01-16 0:19 ` Alistair Francis
2020-01-15 15:07 ` [PATCH v2 82/86] numa: forbid '-numa node, mem' for 5.0 and newer machine types Igor Mammedov
2020-01-15 15:34 ` [libvirt] " Peter Krempa
2020-01-15 16:52 ` Igor Mammedov
2020-01-16 10:42 ` Michal Privoznik
2020-01-16 12:37 ` Igor Mammedov
2020-01-16 13:03 ` Michal Privoznik
2020-01-16 13:49 ` Igor Mammedov
2020-01-16 13:06 ` Daniel P. Berrangé
2020-01-16 13:58 ` Igor Mammedov
2020-01-16 4:36 ` David Gibson [this message]
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=20200116043608.GP54439@umbus \
--to=david@gibson.dropbear.id.au \
--cc=ehabkost@redhat.com \
--cc=imammedo@redhat.com \
--cc=libvir-list@redhat.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=rth@twiddle.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox