Re: [PATCH net-next v5 04/16] ceph: Use sendmsg(MSG_SPLICE_PAGES) rather than sendpage()
From: David Howells <dhowells@redhat.com>
Date: 2023-06-26 15:31:54
Also in:
ceph-devel, linux-mm, lkml
From: David Howells <dhowells@redhat.com>
Date: 2023-06-26 15:31:54
Also in:
ceph-devel, linux-mm, lkml
Ilya Dryomov [off-list ref] wrote:
write_partial_message_data() is net/ceph/messenger_v1.c specific, so it doesn't apply here. I would suggest squashing the two net/ceph patches into one since even the titles are the same.
I would, but they're now applied to net-next, so we need to patch that.
quoted
* Write as much as possible. The socket is expected to be corked, - * so we don't bother with MSG_MORE/MSG_SENDPAGE_NOTLAST here. + * so we don't bother with MSG_MORE here. * * Return: - * 1 - done, nothing (else) to write + * >0 - done, nothing (else) to writeIt would be nice to avoid making tweaks like this to the outer interface as part of switching to a new internal API.
Ok. I'll change that and wrap the sendmsg in a loop. Though, as I asked in an earlier reply, why is MSG_DONTWAIT used here?
quoted
+ if (WARN_ON(!iov_iter_is_bvec(&con->v2.out_iter))) + return -EINVAL;Previously, this WARN_ON + error applied only to the "try sendpage" path. There is a ton of kvec usage in net/ceph/messenger_v2.c, so I'm pretty sure that placing it here breaks everything.
This should have been removed as MSG_SPLICE_PAGES now accepts KVEC and XARRAY iterators also. Btw, is it feasible to use con->v2.out_iter_sendpage to apply MSG_SPLICE_PAGES to the iterator to be transmitted as a whole? It seems to be set depending on iterator type. David