[Qemu-devel] [PULL v5 18/43] numa: deprecate implict memory distribution between nodes

Eduardo Habkost posted 43 patches 6 years, 7 months ago
Maintainers: Andrey Smirnov <andrew.smirnov@gmail.com>, "Dr. David Alan Gilbert" <dgilbert@redhat.com>, Eduardo Habkost <ehabkost@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, Joel Stanley <joel@jms.id.au>, Richard Henderson <rth@twiddle.net>, Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>, Jia Liu <proljc@gmail.com>, Stefano Stabellini <sstabellini@kernel.org>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, Sagar Karandikar <sagark@eecs.berkeley.edu>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Paul Burton <pburton@wavecomp.com>, "Cédric Le Goater" <clg@kaod.org>, Aurelien Jarno <aurelien@aurel32.net>, David Hildenbrand <david@redhat.com>, Paul Durrant <paul.durrant@citrix.com>, Cornelia Huck <cohuck@redhat.com>, Alistair Francis <Alistair.Francis@wdc.com>, Max Filippov <jcmvbkbc@gmail.com>, Alistair Francis <alistair@alistair23.me>, Leif Lindholm <leif.lindholm@linaro.org>, Artyom Tarasenko <atar4qemu@gmail.com>, Thomas Huth <thuth@redhat.com>, Jean-Christophe Dubois <jcd@tribudubois.net>, Helge Deller <deller@gmx.de>, Stafford Horne <shorne@gmail.com>, Igor Mammedov <imammedo@redhat.com>, "Philippe Mathieu-Daudé" <philmd@redhat.com>, Rob Herring <robh@kernel.org>, Marcelo Tosatti <mtosatti@redhat.com>, Radoslaw Biernacki <radoslaw.biernacki@linaro.org>, Christian Borntraeger <borntraeger@de.ibm.com>, "Alex Bennée" <alex.bennee@linaro.org>, David Gibson <david@gibson.dropbear.id.au>, Anthony Perard <anthony.perard@citrix.com>, Laurent Vivier <lvivier@redhat.com>, Eric Blake <eblake@redhat.com>, Halil Pasic <pasic@linux.ibm.com>, Andrew Jeffery <andrew@aj.id.au>, "Hervé Poussineau" <hpoussin@reactos.org>, Aleksandar Rikalo <arikalo@wavecomp.com>, Andrew Baumann <Andrew.Baumann@microsoft.com>, Paolo Bonzini <pbonzini@redhat.com>, "Philippe Mathieu-Daudé" <f4bug@amsat.org>, Peter Maydell <peter.maydell@linaro.org>, Palmer Dabbelt <palmer@sifive.com>, Bastian Koppelmann <kbastian@mail.uni-paderborn.de>, Juan Quintela <quintela@redhat.com>, Markus Armbruster <armbru@redhat.com>, Aleksandar Markovic <amarkovic@wavecomp.com>
[Qemu-devel] [PULL v5 18/43] numa: deprecate implict memory distribution between nodes
Posted by Eduardo Habkost 6 years, 7 months ago
From: Igor Mammedov <imammedo@redhat.com>

Implicit RAM distribution between nodes has exactly the same issues as:
  "numa: deprecate 'mem' parameter of '-numa node' option"
only with QEMU being the user that's 'adding' 'mem' parameter.

Deprecate it, to get it out of the way so that we could consolidate
guest RAM allocation using memory backends making it consistent and
possibly later on transition to using memory devices instead of
adhoc memory mapping for the initial RAM.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <1559205199-233510-4-git-send-email-imammedo@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 hw/core/numa.c       | 3 +++
 qemu-deprecated.texi | 8 ++++++++
 2 files changed, 11 insertions(+)

diff --git a/hw/core/numa.c b/hw/core/numa.c
index b15fbdf79a..b74262b743 100644
--- a/hw/core/numa.c
+++ b/hw/core/numa.c
@@ -405,6 +405,9 @@ void numa_complete_configuration(MachineState *ms)
         if (i == nb_numa_nodes) {
             assert(mc->numa_auto_assign_ram);
             mc->numa_auto_assign_ram(mc, numa_info, nb_numa_nodes, ram_size);
+            warn_report("Default splitting of RAM between nodes is deprecated,"
+                        " Use '-numa node,memdev' to explictly define RAM"
+                        " allocation per node");
         }
 
         numa_total = 0;
diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi
index 44c9a95966..2fe9b72121 100644
--- a/qemu-deprecated.texi
+++ b/qemu-deprecated.texi
@@ -104,6 +104,14 @@ 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}
+parameter described above with the difference that the role of the user plays
+QEMU using implicit generic or board specific splitting rule.
+Use @option{memdev} with @var{memory-backend-ram} backend or @option{mem} (if
+it's supported by used machine type) to define mapping explictly instead.
+
 @section QEMU Machine Protocol (QMP) commands
 
 @subsection block-dirty-bitmap-add "autoload" parameter (since 2.12.0)
-- 
2.18.0.rc1.1.g3f1ff2140