[pve-devel] [PATCH v3 qemu-server 05/13] memory: add get_static_mem && remove parse_hotplug_features
Fiona Ebner
f.ebner at proxmox.com
Fri Feb 3 14:44:29 CET 2023
As the commit title suggests, this patch is doing two things and could
be split up.
Nit: "remove calls to parse_hotplug_features" is more accurate
Am 02.02.23 um 12:03 schrieb Alexandre Derumier:
> @@ -44,6 +43,23 @@ sub parse_memory {
> return $res;
> }
>
> +my sub get_static_mem {
> + my ($conf, $sockets, $hotplug) = @_;
> +
> + my $static_memory = 0;
> + my $memory = parse_memory($conf->{memory});
> +
> + if ($hotplug) {
> + #legacy
Nit: it's not legacy yet, but only after patch 09/13 ;)
> + $static_memory = 1024;
> + $static_memory = $static_memory * $sockets if ($conf->{hugepages} && $conf->{hugepages} == 1024);
Style nit: useless parentheses.
> + } else {
> + $static_memory = $memory->{current};
> + }
> +
> + return $static_memory;
> +}
> +
> my $_host_bits;
> my sub get_host_phys_address_bits {
> return $_host_bits if defined($_host_bits);
More information about the pve-devel
mailing list