Re: [PATCH RFC v2 06/10] vdpa_sim: cleanup kiovs in vdpasim_free()

2021-01-31 Thread Jason Wang
On 2021/1/28 下午10:41, Stefano Garzarella wrote: vringh_getdesc_iotlb() allocates memory to store the kvec, that is freed with vringh_kiov_cleanup(). vringh_getdesc_iotlb() is able to reuse a kvec previously allocated, so in order to avoid to allocate the kvec for each request, we are not

[PATCH RFC v2 06/10] vdpa_sim: cleanup kiovs in vdpasim_free()

2021-01-28 Thread Stefano Garzarella
vringh_getdesc_iotlb() allocates memory to store the kvec, that is freed with vringh_kiov_cleanup(). vringh_getdesc_iotlb() is able to reuse a kvec previously allocated, so in order to avoid to allocate the kvec for each request, we are not calling vringh_kiov_cleanup() when we finished to handle