Re: [PATCH] virtio_ring: skip cpu sync when mapping fails

2025-01-12 Thread Jason Wang
On Fri, Jan 10, 2025 at 4:32 PM Michael S. Tsirkin wrote: > > On Fri, Jan 10, 2025 at 11:32:46AM +0800, Jason Wang wrote: > > On Wed, Jan 8, 2025 at 7:35 PM Michael S. Tsirkin wrote: > > > > > > On Mon, Nov 11, 2024 at 10:55:38AM +0800, Jason Wang wrote: > > > > There's no need to sync DMA for CP

Re: [PATCH] virtio_ring: skip cpu sync when mapping fails

2025-01-10 Thread Michael S. Tsirkin
On Fri, Jan 10, 2025 at 11:32:46AM +0800, Jason Wang wrote: > On Wed, Jan 8, 2025 at 7:35 PM Michael S. Tsirkin wrote: > > > > On Mon, Nov 11, 2024 at 10:55:38AM +0800, Jason Wang wrote: > > > There's no need to sync DMA for CPU on mapping errors. So this patch > > > skips the CPU sync in the erro

Re: [PATCH] virtio_ring: skip cpu sync when mapping fails

2025-01-09 Thread Jason Wang
On Wed, Jan 8, 2025 at 7:35 PM Michael S. Tsirkin wrote: > > On Mon, Nov 11, 2024 at 10:55:38AM +0800, Jason Wang wrote: > > There's no need to sync DMA for CPU on mapping errors. So this patch > > skips the CPU sync in the error handling path of DMA mapping. > > > > Signed-off-by: Jason Wang > >

Re: [PATCH] virtio_ring: skip cpu sync when mapping fails

2025-01-08 Thread Michael S. Tsirkin
On Mon, Nov 11, 2024 at 10:55:38AM +0800, Jason Wang wrote: > There's no need to sync DMA for CPU on mapping errors. So this patch > skips the CPU sync in the error handling path of DMA mapping. > > Signed-off-by: Jason Wang So as I said, I do not get why we are optimizing error paths. The comm

Re: [PATCH] virtio_ring: skip cpu sync when mapping fails

2024-11-12 Thread Jason Wang
On Wed, Nov 13, 2024 at 5:46 AM Michael S. Tsirkin wrote: > > On Mon, Nov 11, 2024 at 04:36:52PM +0800, Jason Wang wrote: > > On Mon, Nov 11, 2024 at 3:30 PM Michael S. Tsirkin wrote: > > > > > > On Mon, Nov 11, 2024 at 10:55:38AM +0800, Jason Wang wrote: > > > > There's no need to sync DMA for C

Re: [PATCH] virtio_ring: skip cpu sync when mapping fails

2024-11-12 Thread Michael S. Tsirkin
On Mon, Nov 11, 2024 at 04:36:52PM +0800, Jason Wang wrote: > On Mon, Nov 11, 2024 at 3:30 PM Michael S. Tsirkin wrote: > > > > On Mon, Nov 11, 2024 at 10:55:38AM +0800, Jason Wang wrote: > > > There's no need to sync DMA for CPU on mapping errors. So this patch > > > skips the CPU sync in the err

Re: [PATCH] virtio_ring: skip cpu sync when mapping fails

2024-11-11 Thread Jason Wang
On Mon, Nov 11, 2024 at 3:30 PM Michael S. Tsirkin wrote: > > On Mon, Nov 11, 2024 at 10:55:38AM +0800, Jason Wang wrote: > > There's no need to sync DMA for CPU on mapping errors. So this patch > > skips the CPU sync in the error handling path of DMA mapping. > > > > Signed-off-by: Jason Wang >

Re: [PATCH] virtio_ring: skip cpu sync when mapping fails

2024-11-10 Thread Michael S. Tsirkin
On Mon, Nov 11, 2024 at 10:55:38AM +0800, Jason Wang wrote: > There's no need to sync DMA for CPU on mapping errors. So this patch > skips the CPU sync in the error handling path of DMA mapping. > > Signed-off-by: Jason Wang DMA sync is idempotent. Extra work for slow path. Why do we bother? >

Re: [PATCH] virtio_ring: skip cpu sync when mapping fails

2024-11-10 Thread Xuan Zhuo
On Mon, 11 Nov 2024 10:55:38 +0800, Jason Wang wrote: > There's no need to sync DMA for CPU on mapping errors. So this patch > skips the CPU sync in the error handling path of DMA mapping. > > Signed-off-by: Jason Wang Reviewed-by: Xuan Zhuo > --- > drivers/virtio/virtio_ring.c | 98

[PATCH] virtio_ring: skip cpu sync when mapping fails

2024-11-10 Thread Jason Wang
There's no need to sync DMA for CPU on mapping errors. So this patch skips the CPU sync in the error handling path of DMA mapping. Signed-off-by: Jason Wang --- drivers/virtio/virtio_ring.c | 98 +--- 1 file changed, 57 insertions(+), 41 deletions(-) diff --git a