Re: [PATCH] numa: warn if numa 'mem' option or default RAM splitting between nodes is used.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 06, 2019 at 05:30:25PM +0100, Igor Mammedov wrote:
> Ammend -numa option docs and print warnings if 'mem' option or default RAM
> splitting between nodes is used. It's intended to discourage users from using
> configuration that allows only to fake NUMA on guest side while leading
> to reduced performance of the guest due to inability to properly configure
> VM's RAM on the host.
> 
> In NUMA case, it's recommended to always explicitly configure guest RAM
> using -numa node,memdev={backend-id} option.
> 
> Signed-off-by: Igor Mammedov <imammedo@xxxxxxxxxx>
> ---
>  numa.c          |  5 +++++
>  qemu-options.hx | 12 ++++++++----
>  2 files changed, 13 insertions(+), 4 deletions(-)
> 
> diff --git a/numa.c b/numa.c
> index 3875e1e..c6c2a6f 100644
> --- a/numa.c
> +++ b/numa.c
> @@ -121,6 +121,8 @@ static void parse_numa_node(MachineState *ms, NumaNodeOptions *node,
>  
>      if (node->has_mem) {
>          numa_info[nodenr].node_mem = node->mem;
> +        warn_report("Parameter -numa node,mem is obsolete,"
> +                    " use -numa node,memdev instead");

I don't think we should do this. Libvirt isn't going to stop using this
option in the near term. When users see warnings like this in logs
they'll often file bugs reports thinking something is broken which is
not the case here. 

>      }
>      if (node->has_memdev) {
>          Object *o;
> @@ -407,6 +409,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 obsolete,"
> +                        " Use '-numa node,memdev' to explictly define RAM"
> +                        " allocation per node");

I think this one is ok as I don't believe libvirt triggers this code path

> diff --git a/qemu-options.hx b/qemu-options.hx
> index 1cf9aac..033e311 100644
> --- a/qemu-options.hx
> +++ b/qemu-options.hx
> @@ -206,10 +206,14 @@ 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.
> +@samp{memdev} assigns RAM from a given memory backend device to a node.
> +
> +Legacy options/behaviour: @samp{mem} assigns a given RAM amount to a node.
> +If @samp{mem} and @samp{memdev} are omitted in all nodes, RAM is split equally
> +between them. Option @samp{mem} and default RAM splitting are obsolete as they
> +do not provide means to manage RAM on host side and only allow QEMU to fake
> +NUMA support which in practice could degrade VM performance.
> +It's advised to always explicitly configure NUMA RAM using @samp{memdev} option.
>  
>  @samp{mem} and @samp{memdev} are mutually exclusive. Furthermore,
>  if one node uses @samp{memdev}, all of them have to use it.
> -- 
> 2.7.4
> 

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux