virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
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: Tue, 12 Nov 2024 16:45:51 -0500	[thread overview]
Message-ID: <20241112164527-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <CACGkMEuCx=ht2Q75xJ11EGsjuZPWcTTpGh7OyVEHCOhGDB5f7A@mail.gmail.com>

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 <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>
> >
> > DMA sync is idempotent.
> > Extra work for slow path.  Why do we bother?
> 
> dma_map_sg() did this, since current virtio hack sg mappings to per
> page mapping, we lose such optimization.
> 
> Actually the path is not necessarily slowpath in some setups like
> swiotlb or VDUSE.
> 
> Thanks

I don't get how it's not a slowpath. Example?

-- 
MST


  reply	other threads:[~2024-11-12 21:45 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 [this message]
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
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=20241112164527-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).