iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: "Petr Tesařík" <petr@tesarici.cz>
To: Christoph Hellwig <hch@infradead.org>
Cc: iommu@lists.linux.dev, Jason Gunthorpe <jgg@ziepe.ca>
Subject: Re: Scatter-gather DMA
Date: Wed, 7 Jun 2023 19:36:43 +0200	[thread overview]
Message-ID: <20230607193643.2348dce1@meshulam.tesarici.cz> (raw)
In-Reply-To: <ZICLfJnelBvBr/zF@infradead.org>

On Wed, 7 Jun 2023 06:51:56 -0700
Christoph Hellwig <hch@infradead.org> wrote:

> On Tue, Jun 06, 2023 at 04:22:01PM +0200, Petr Tesařík wrote:
> > Is there any reason to use struct page except that the SG list API is
> > based on page lists?  
> 
> That's how the scatterlist was historically done, and we have plenty
> of places that use the scatterlist for accessing the data using the
> page pointer.
> 
> Looking back the scatterlist was a rather bad idea as it mixes the
> kernel in-memory representation (page, offset, len) with the DMA
> information dma_address, dma_len.   I've been proposing forever to
> split these two and just use a bio_vec for the kernel mapping
> representation and a new phys_vec for the dma_address, dma_len tuples.
> 
> And while I've only been talking, Jason apparently already has working
> prototype code for this, but I've not seen it yet.

Thanks for the explanation. The important new piece of information is
that somebody (Jason) is already taking care, so I will not interfere.

Petr T

      reply	other threads:[~2023-06-07 17:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-06 14:22 Scatter-gather DMA Petr Tesařík
2023-06-07 13:51 ` Christoph Hellwig
2023-06-07 17:36   ` Petr Tesařík [this message]

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=20230607193643.2348dce1@meshulam.tesarici.cz \
    --to=petr@tesarici.cz \
    --cc=hch@infradead.org \
    --cc=iommu@lists.linux.dev \
    --cc=jgg@ziepe.ca \
    /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).