[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250321161407.3333724-1-dhowells@redhat.com>
Date: Fri, 21 Mar 2025 16:14:00 +0000
From: David Howells <dhowells@...hat.com>
To: Leon Romanovsky <leonro@...dia.com>
Cc: David Howells <dhowells@...hat.com>,
Christian Brauner <christian@...uner.io>,
Matthew Wilcox <willy@...radead.org>,
Chuck Lever <chuck.lever@...cle.com>,
Steve French <smfrench@...il.com>,
Ilya Dryomov <idryomov@...il.com>,
netfs@...ts.linux.dev,
linux-fsdevel@...r.kernel.org,
linux-block@...r.kernel.org,
linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: [RFC PATCH 0/4] iov_iter: Add composite, scatterlist and skbuff iterator types
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(-)
Powered by blists - more mailing lists