[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <77a8b8d5-69c2-4386-bae5-871270aa110d@redhat.com>
Date: Wed, 21 Feb 2024 09:47:44 +0100
From: Maxime Coquelin <maxime.coquelin@...hat.com>
To: Christoph Hellwig <hch@...radead.org>
Cc: mst@...hat.com, jasowang@...hat.com, xuanzhuo@...ux.alibaba.com,
xieyongji@...edance.com, axboe@...nel.dk, gregkh@...uxfoundation.org,
brauner@...nel.org, lstoakes@...il.com, virtualization@...ts.linux.dev,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
david.marchand@...hat.com
Subject: Re: [PATCH] vduse: implement DMA sync callbacks
Hello Christoph,
On 2/20/24 10:01, Christoph Hellwig wrote:
> On Mon, Feb 19, 2024 at 06:06:06PM +0100, Maxime Coquelin wrote:
>> Since commit 295525e29a5b ("virtio_net: merge dma
>> operations when filling mergeable buffers"), VDUSE device
>> require support for DMA's .sync_single_for_cpu() operation
>> as the memory is non-coherent between the device and CPU
>> because of the use of a bounce buffer.
>>
>> This patch implements both .sync_single_for_cpu() and
>> sync_single_for_device() callbacks, and also skip bounce
>> buffer copies during DMA map and unmap operations if the
>> DMA_ATTR_SKIP_CPU_SYNC attribute is set to avoid extra
>> copies of the same buffer.
>
> vduse really needs to get out of implementing fake DMA operations for
> something that is not DMA.
>
I wasn't involved when vduse was initially submitted, I don't know if
any alternative was considered at that time.
Do you have something specific in mind we could do to have VDUSE not
implementing DMA ops, knowing other vDPA devices rely on DMA?
Thanks,
Maxime
Powered by blists - more mailing lists