Re: [LSF/MM/BPF TOPIC] Improving iov_iter - and replacing scatterlists

Leon Romanovsky
2025-01-20T14:22:21Z

On Fri, Jan 17, 2025 at 09:16:52PM +0000, David Howells wrote:
> Hi,
>
> I'd like to propose a discussion of two things: firstly, how might we improve
> iov_iter and, secondly, would it be possible to replace scatterlists.

<...>

> Rumour has it that John Hubbard may be working along similar lines, possibly
> just in the area of bio_vecs and ITER_BVEC.
>
>
> [*] Second: Can we replace the uses of scatterlist with iov_iter and reduce
> the number of iterator classes we have?

<...>

I would say yes to the questions.

Regarding rumors, I don't know, but Christoph, Jason and I are working towards
this goal. We proposed new DMA API which doesn't need scatterlists and allows
callers to implement their own data-structures.

See this "[PATCH v6 00/17] Provide a new two step DMA mapping API" series
https://lore.kernel.org/all/cover.1737106761.git.leon@kernel.org
and its block layer followup "[RFC PATCH 0/7] Block and NMMe PCI use of
new DMA mapping API"
https://lore.kernel.org/all/cover.1730037261.git.leon@kernel.org

Thanks