[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <648d7b72-134c-0dfb-8d91-8c2eda51e86c@redhat.com>
Date: Thu, 17 Dec 2020 12:29:27 +0800
From: Jason Wang <jasowang@...hat.com>
To: Stefano Garzarella <sgarzare@...hat.com>,
virtualization@...ts.linux-foundation.org
Cc: Oren Duer <oren@...dia.com>, Laurent Vivier <lvivier@...hat.com>,
Max Gurtovoy <mgurtovoy@...dia.com>,
Randy Dunlap <rdunlap@...radead.org>,
Shahaf Shuler <shahafs@...dia.com>,
Stefan Hajnoczi <stefanha@...hat.com>,
"Michael S. Tsirkin" <mst@...hat.com>, Eli Cohen <elic@...dia.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 04/18] vdpa_sim: make IOTLB entries limit configurable
On 2020/12/15 下午10:42, Stefano Garzarella wrote:
> Some devices may require a higher limit for the number of IOTLB
> entries, so let's make it configurable through a module parameter.
>
> By default, it's initialized with the current limit (2048).
>
> Suggested-by: Jason Wang <jasowang@...hat.com>
> Signed-off-by: Stefano Garzarella <sgarzare@...hat.com>
Acked-by: Jason Wang <jasowang@...hat.com>
> ---
> drivers/vdpa/vdpa_sim/vdpa_sim.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c
> index 07ccc8609784..d716bfaadb3b 100644
> --- a/drivers/vdpa/vdpa_sim/vdpa_sim.c
> +++ b/drivers/vdpa/vdpa_sim/vdpa_sim.c
> @@ -31,6 +31,11 @@ static int batch_mapping = 1;
> module_param(batch_mapping, int, 0444);
> MODULE_PARM_DESC(batch_mapping, "Batched mapping 1 -Enable; 0 - Disable");
>
> +static int max_iotlb_entries = 2048;
> +module_param(max_iotlb_entries, int, 0444);
> +MODULE_PARM_DESC(max_iotlb_entries,
> + "Maximum number of iotlb entries. 0 means unlimited. (default: 2048)");
> +
> static char *macaddr;
> module_param(macaddr, charp, 0);
> MODULE_PARM_DESC(macaddr, "Ethernet MAC address");
> @@ -371,7 +376,7 @@ static struct vdpasim *vdpasim_create(void)
> if (!vdpasim->vqs)
> goto err_iommu;
>
> - vdpasim->iommu = vhost_iotlb_alloc(2048, 0);
> + vdpasim->iommu = vhost_iotlb_alloc(max_iotlb_entries, 0);
> if (!vdpasim->iommu)
> goto err_iommu;
>
Powered by blists - more mailing lists