From: "Michael S. Tsirkin" <mst@redhat.com>
To: Jason Wang <jasowang@redhat.com>
Cc: xuanzhuo@linux.alibaba.com, eperezma@redhat.com,
virtualization@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] virtio_ring: skip cpu sync when mapping fails
Date: Fri, 10 Jan 2025 03:32:41 -0500 [thread overview]
Message-ID: <20250110033113-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <CACGkMEv_sMF5rmeaWchAbgyFd0a7-q+D_Gfejs7NpwcG-YD-YA@mail.gmail.com>
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 <mst@redhat.com> 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 <jasowang@redhat.com>
> >
> >
> > So as I said, I do not get why we are optimizing error paths.
> > The commit log at least needs to be improved to document
> > the motivation.
>
> As replied before. Does the following make more sense?
>
> 1) dma_map_sg() did this
> 2) When the driver tries to submit more buffers than SWIOTLB allows,
> dma_map might fail, in these cases, bouncing is useless.
>
> Thanks
About 2 - it's an error path. Is there a reason to think it's common?
About 1 - ok reasonable. You can say "while we have no data on how
common this is, it is consistent with what dma_map_sg does".
--
MST
next prev parent reply other threads:[~2025-01-10 8:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-11 2:55 [PATCH] virtio_ring: skip cpu sync when mapping fails Jason Wang
2024-11-11 2:59 ` Xuan Zhuo
2024-11-11 7:30 ` Michael S. Tsirkin
2024-11-11 8:36 ` Jason Wang
2024-11-12 21:45 ` Michael S. Tsirkin
2024-11-13 1:35 ` Jason Wang
2025-01-08 11:35 ` Michael S. Tsirkin
2025-01-10 3:32 ` Jason Wang
2025-01-10 8:32 ` Michael S. Tsirkin [this message]
2025-01-13 3:06 ` Jason Wang
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=20250110033113-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=eperezma@redhat.com \
--cc=jasowang@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=virtualization@lists.linux.dev \
--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;
as well as URLs for NNTP newsgroup(s).