From: Jeff Layton <jlayton@kernel.org>
To: xiubli@redhat.com, idryomov@gmail.com
Cc: ceph-devel@vger.kernel.org, dhowells@redhat.com,
viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org
Subject: [PATCH v2 0/2] libceph: add new iov_iter msg_data type and use it for reads
Date: Mon, 27 Jun 2022 11:54:47 -0400 [thread overview]
Message-ID: <20220627155449.383989-1-jlayton@kernel.org> (raw)
v2:
- make _next handler advance the iterator in preparation for coming
changes to iov_iter_get_pages
This is an update to the patchset I sent back on June 9th. Since then,
Al informed me that he intends to change iov_iter_get_pages to advance
the iterator automatically. That changes the implementation a bit, in
that we now need to track how far the iov_iter leads the cursor at any
given time.
I've tested this with xfstests and it seems to behave. Cover letter
from the original posting follows.
------------------------8<-------------------------
This patchset was inspired by some earlier work that David Howells did
to add a similar type.
Currently, we take an iov_iter from the netfs layer, turn that into an
array of pages, and then pass that to the messenger which eventually
turns that back into an iov_iter before handing it back to the socket.
This patchset adds a new ceph_msg_data_type that uses an iov_iter
directly instead of requiring an array of pages or bvecs. This allows
us to avoid an extra allocation in the buffered read path, and should
make it easier to plumb in write helpers later.
For now, this is still just a slow, stupid implementation that hands
the socket layer a page at a time like the existing messenger does. It
doesn't yet attempt to pass through the iov_iter directly.
I have some patches that pass the cursor's iov_iter directly to the
socket in the receive path, but it requires some infrastructure that's
not in mainline yet (iov_iter_scan(), for instance). It should be
possible to something similar in the send path as well.
Jeff Layton (2):
libceph: add new iov_iter-based ceph_msg_data_type and
ceph_osd_data_type
ceph: use osd_req_op_extent_osd_iter for netfs reads
fs/ceph/addr.c | 18 +------
include/linux/ceph/messenger.h | 8 ++++
include/linux/ceph/osd_client.h | 4 ++
net/ceph/messenger.c | 85 +++++++++++++++++++++++++++++++++
net/ceph/osd_client.c | 27 +++++++++++
5 files changed, 125 insertions(+), 17 deletions(-)
--
2.36.1
next reply other threads:[~2022-06-27 15:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-27 15:54 Jeff Layton [this message]
2022-06-27 15:54 ` [PATCH v2 1/2] libceph: add new iov_iter-based ceph_msg_data_type and ceph_osd_data_type Jeff Layton
2022-07-01 2:04 ` Xiubo Li
2022-07-01 10:16 ` Jeff Layton
2022-06-27 15:54 ` [PATCH v2 2/2] ceph: use osd_req_op_extent_osd_iter for netfs reads Jeff Layton
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=20220627155449.383989-1-jlayton@kernel.org \
--to=jlayton@kernel.org \
--cc=ceph-devel@vger.kernel.org \
--cc=dhowells@redhat.com \
--cc=idryomov@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
--cc=xiubli@redhat.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