From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: mst@redhat.com, jasowang@redhat.com, xuanzhuo@linux.alibaba.com,
xieyongji@bytedance.com, axboe@kernel.dk,
gregkh@linuxfoundation.org, brauner@kernel.org,
lstoakes@gmail.com, virtualization@lists.linux.dev,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
david.marchand@redhat.com
Subject: Re: [PATCH] vduse: implement DMA sync callbacks
Date: Wed, 21 Feb 2024 09:47:44 +0100 [thread overview]
Message-ID: <77a8b8d5-69c2-4386-bae5-871270aa110d@redhat.com> (raw)
In-Reply-To: <ZdRqcIRmDD-70ap3@infradead.org>
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
next prev parent reply other threads:[~2024-02-21 8:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-19 17:06 Maxime Coquelin
2024-02-20 9:01 ` Christoph Hellwig
2024-02-21 8:47 ` Maxime Coquelin [this message]
2024-02-22 20:29 ` Michael S. Tsirkin
2024-02-23 8:03 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=77a8b8d5-69c2-4386-bae5-871270aa110d@redhat.com \
--to=maxime.coquelin@redhat.com \
--cc=axboe@kernel.dk \
--cc=brauner@kernel.org \
--cc=david.marchand@redhat.com \
--cc=gregkh@linuxfoundation.org \
--cc=hch@infradead.org \
--cc=jasowang@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lstoakes@gmail.com \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=virtualization@lists.linux.dev \
--cc=xieyongji@bytedance.com \
--cc=xuanzhuo@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®