linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/4] iov_iter: Add composite, scatterlist and skbuff iterator types
@ 2025-03-21 16:14 David Howells
  2025-03-21 16:14 ` [RFC PATCH 1/4] iov_iter: Move ITER_DISCARD and ITER_XARRAY iteration out-of-line David Howells
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: David Howells @ 2025-03-21 16:14 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: David Howells, Christian Brauner, Matthew Wilcox, Chuck Lever,
	Steve French, Ilya Dryomov, netfs, linux-fsdevel, linux-block,
	linux-mm, linux-kernel

Hi Leon,

Here are some patches that illustrate some of what I'm thinking of doing to
iov iterators.  Note that they are incomplete as I won't have time to
finish or test them before LSF, but I thought I'd post them for use as a
discussion point.

So the first thing I want to do is to move certain iterators out of line
from the main inline iteration multiplexor.  This code gets relentlessly
duplicated and adding further iterator types expands a whole load of
places.  So the DISCARD iterator (which is just a simple short circuit) and
the XARRAY iterator (which is obsolete) move out of line.

Then I want to add three more types, for now:

 (1) ITER_ITERLIST.  A compound iterator that takes an array of iterators
     of disparate types.  The aim here is to make it possible to fabricate
     an network message in one go (say an RPC call) and pass it to a socket
     without the need for corking.

 (2) ITER_SCATTERLIST.  An iterator that takes a scatterlist.  This can be
     used to act as a bridge in converting interfaces that currently take a
     scatterlist (e.g. crypto).  It requires extra fields adding to the
     iov_iter struct because chained scatterlists do not have have a rewind
     capability and so iov_iter_revert() must go back to the beginning and
     fast-forward.

 (3) ITER_SKBUFF.  An iterator that takes a network buffer.  The aim here
     is to render skb_to_sgvec() unnecessary for doing crypto operations.

The patches can also be found here:

	https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/log/?h=iov-experimental

David

David Howells (4):
  iov_iter: Move ITER_DISCARD and ITER_XARRAY iteration out-of-line
  iov_iter: Add an iterator-of-iterators
  iov_iter: Add a scatterlist iterator type
  iov_iter: Add a scatterlist iterator type [INCOMPLETE]

 include/linux/iov_iter.h |  77 +----
 include/linux/uio.h      |  37 +++
 lib/iov_iter.c           | 675 ++++++++++++++++++++++++++++++++++++++-
 3 files changed, 710 insertions(+), 79 deletions(-)


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-03-23 14:35 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-21 16:14 [RFC PATCH 0/4] iov_iter: Add composite, scatterlist and skbuff iterator types David Howells
2025-03-21 16:14 ` [RFC PATCH 1/4] iov_iter: Move ITER_DISCARD and ITER_XARRAY iteration out-of-line David Howells
2025-03-21 16:14 ` [RFC PATCH 2/4] iov_iter: Add an iterator-of-iterators David Howells
2025-03-21 16:14 ` [RFC PATCH 3/4] iov_iter: Add a scatterlist iterator type David Howells
2025-03-21 16:14 ` [RFC PATCH 4/4] iov_iter: Add a scatterlist iterator type [INCOMPLETE] David Howells
2025-03-23  6:21 ` [RFC PATCH 0/4] iov_iter: Add composite, scatterlist and skbuff iterator types Christoph Hellwig
2025-03-23 13:39   ` Hannes Reinecke
2025-03-23 14:35     ` Matthew Wilcox
2025-03-23 14:33   ` Matthew Wilcox

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).