From: Christoph Hellwig <hch@infradead.org>
To: "Christoph Hellwig" <hch@infradead.org>,
"Philipp Reisner" <philipp.reisner@linbit.com>,
"Christoph Böhmwalder" <christoph.boehmwalder@linbit.com>,
drbd-dev@lists.linbit.com, linux-block@vger.kernel.org
Subject: Re: transferring bvecs over the network in drbd
Date: Thu, 8 May 2025 03:06:53 -0700 [thread overview]
Message-ID: <aByCPR7Ynl93qDiY@infradead.org> (raw)
In-Reply-To: <aBxt3NsJcofxhV5P@grappa.linbit>
On Thu, May 08, 2025 at 10:39:56AM +0200, Lars Ellenberg wrote:
> For async replication, we want to actually copy data into send buffer,
> we cannot have the network stack hold a reference to a page for which
> we signalled io completion already.
>
> For sync replication we want to avoid additional data copy if possible,
> so try to use "zero copy sendpage".
I didn't even complain about having both variants :)
>
> That's why we have two variants of what looks to be the same thing.
>
> Why we do it that way: probably when we wrote that part,
> a better infrastructure was not available, or we were not aware of it.
Yes. While the iov_iter and the bvec version of have been around
for a long time, drbd probably still predates them.
> Thanks for the pointers, we'll look into it.
> Using more efficient ways to do stuff sounds good.
thanks. Note that now that ->sendpage has been replaced with the
MSG_SPLICE_PAGES flag you can actually share most code for both
variants as well.
prev parent reply other threads:[~2025-05-08 10:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-08 6:45 transferring bvecs over the network in drbd Christoph Hellwig
2025-05-08 8:39 ` Lars Ellenberg
2025-05-08 10:06 ` Christoph Hellwig [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=aByCPR7Ynl93qDiY@infradead.org \
--to=hch@infradead.org \
--cc=christoph.boehmwalder@linbit.com \
--cc=drbd-dev@lists.linbit.com \
--cc=linux-block@vger.kernel.org \
--cc=philipp.reisner@linbit.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