Re: [PATCH v3 05/19] vdpa_sim: remove the limit of IOTLB entries

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

 




On 2020/12/4 上午1:04, Stefano Garzarella wrote:
The simulated devices can support multiple queues, so this limit
should be defined according to the number of queues supported by
the device.

Since we are in a simulator, let's simply remove that limit.

Suggested-by: Jason Wang <jasowang@xxxxxxxxxx>
Acked-by: Jason Wang <jasowang@xxxxxxxxxx>
Signed-off-by: Stefano Garzarella <sgarzare@xxxxxxxxxx>


Rethink about this, since simulator can be used by VM, so the allocation is actually guest trigger-able when vIOMMU is enabled.

This means we need a limit somehow, (e.g I remember swiotlb is about 64MB by default). Or having a module parameter for this.

Btw, have you met any issue when using 2048, I guess it can happen when we run several processes in parallel?


---
v3:
- used VHOST_IOTLB_UNLIMITED macro [Jason]
v2:
- added VDPASIM_IOTLB_LIMIT macro [Jason]
---
  drivers/vdpa/vdpa_sim/vdpa_sim.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c
index 295a770caac0..688aceaa6543 100644
--- a/drivers/vdpa/vdpa_sim/vdpa_sim.c
+++ b/drivers/vdpa/vdpa_sim/vdpa_sim.c
@@ -368,7 +368,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(VHOST_IOTLB_UNLIMITED, 0);
  	if (!vdpasim->iommu)
  		goto err_iommu;

_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/virtualization




[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux