[dpdk-dev] [PATCH] vhost: Clean iotlb cache on vring stop
Maxime Coquelin
maxime.coquelin at redhat.com
Tue Sep 28 17:29:35 CEST 2021
On 8/27/21 18:12, Eugenio Pérez wrote:
> Old IOVA cache entries are left when there is a change on virtio driver
> in VM. In case that all these old entries have iova addresses lesser
> than new iova entries, vhost code will need to iterate all the cache to
> find the new ones. In case of just a new iova entry needed for the new
> translations, this condition will last forever.
>
> This has been observed in virtio-net to testpmd's vfio-pci driver
> transition, reducing the performance from more than 10Mpps to less than
> 0.07Mpps if the hugepage address was higher than the networking
> buffers. Since all new buffers are contained in this new gigantic page,
> vhost needs to scan IOTLB_CACHE_SIZE - 1 for each translation at worst.
>
> Signed-off-by: Eugenio Pérez <eperezma at redhat.com>
> Reported-by: Pei Zhang <pezhang at redhat.com>
> ---
> lib/vhost/vhost_user.c | 2 ++
> 1 file changed, 2 insertions(+)
>
Applied to dpdk-next-virtio/main with changes suggested by Chenbo.
Thanks,
Maxime
More information about the dev
mailing list