[pve-devel] [PATCH pve-kernel] add patch: vhost: bump max_mem_regions to 509

Alexandre Derumier aderumier at odiso.com
Mon Nov 16 07:38:08 CET 2020


BTW,
maybe as futur improvement, we could add an option to specify static
dimm size. (like all dimm are 2GB, 4GB,...)
Should be easy to implement, and only change increment in gui for
maxmem,balloon.

(I'm also looking to implement virtio-mem, but I think it's not 100%
complete for unplug currently)

Le dim. 15 nov. 2020 à 19:36, Alexandre Derumier <aderumier at odiso.com> a écrit :
>
> Currently, default value is 64, so qemu is limited to 64 hotplug dimm
>
> original patch from 2015
> https://patchwork.kernel.org/project/kvm/patch/1438180163-275465-3-git-send-email-imammedo@redhat.com/
>
> We have discusted about this in 2016 (At this time some optimisations patches were missing)
> https://lists.proxmox.com/pipermail/pve-devel/2016-December/024502.html
>
> Also, this fix this bugzilla
> https://bugzilla.proxmox.com/show_bug.cgi?id=1426
>
> Wolfgang proposed to have explicit dimm module management, it could be great,
> but for now this patch is fixed the current implemlentation.
>
>
>
> Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
> ---
>  ...08-vhost-bump-max_mem_regions-to-509.patch | 32 +++++++++++++++++++
>  submodules/ubuntu-focal                       |  2 +-
>  2 files changed, 33 insertions(+), 1 deletion(-)
>  create mode 100644 patches/kernel/0008-vhost-bump-max_mem_regions-to-509.patch
>
> diff --git a/patches/kernel/0008-vhost-bump-max_mem_regions-to-509.patch b/patches/kernel/0008-vhost-bump-max_mem_regions-to-509.patch
> new file mode 100644
> index 0000000..f547b7d
> --- /dev/null
> +++ b/patches/kernel/0008-vhost-bump-max_mem_regions-to-509.patch
> @@ -0,0 +1,32 @@
> +From 721ac248403a4c7ea98c416fc28f22c0bfbbb63d Mon Sep 17 00:00:00 2001
> +From: Alexandre Derumier <aderumier at odiso.com>
> +Date: Sun, 15 Nov 2020 19:19:28 +0100
> +Subject: [PATCH] vhost: bump max_mem_regions to 509
> +
> +Currently, default value is 64, so qemu is limited to 64 hotplug dimm
> +
> +Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
> +---
> + drivers/vhost/vhost.c | 4 ++--
> + 1 file changed, 2 insertions(+), 2 deletions(-)
> +
> +diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
> +index 36ca2cf419bf..1d3eae6555fa 100644
> +--- a/drivers/vhost/vhost.c
> ++++ b/drivers/vhost/vhost.c
> +@@ -33,10 +33,10 @@
> +
> + #include "vhost.h"
> +
> +-static ushort max_mem_regions = 64;
> ++static ushort max_mem_regions = 509;
> + module_param(max_mem_regions, ushort, 0444);
> + MODULE_PARM_DESC(max_mem_regions,
> +-      "Maximum number of memory regions in memory map. (default: 64)");
> ++      "Maximum number of memory regions in memory map. (default: 509)");
> + static int max_iotlb_entries = 2048;
> + module_param(max_iotlb_entries, int, 0444);
> + MODULE_PARM_DESC(max_iotlb_entries,
> +--
> +2.20.1
> +
> diff --git a/submodules/ubuntu-focal b/submodules/ubuntu-focal
> index fd386a6..721ac24 160000
> --- a/submodules/ubuntu-focal
> +++ b/submodules/ubuntu-focal
> @@ -1 +1 @@
> -Subproject commit fd386a64a1ed3f2f047318508ebd733f56a4fab2
> +Subproject commit 721ac248403a4c7ea98c416fc28f22c0bfbbb63d
> --
> 2.20.1
>




More information about the pve-devel mailing list