From: David Howells <dhowells@redhat.com>
To: netdev@vger.kernel.org
Cc: David Howells <dhowells@redhat.com>,
Alexander Duyck <alexander.duyck@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Willem de Bruijn <willemdebruijn.kernel@gmail.com>,
David Ahern <dsahern@kernel.org>,
Matthew Wilcox <willy@infradead.org>,
Jens Axboe <axboe@kernel.dk>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: [PATCH net-next v5 00/16] splice, net: Switch over users of sendpage() and remove it
Date: Fri, 23 Jun 2023 23:54:57 +0100 [thread overview]
Message-ID: <20230623225513.2732256-1-dhowells@redhat.com> (raw)
Here's the final set of patches towards the removal of sendpage. All the
drivers that use sendpage() get switched over to using sendmsg() with
MSG_SPLICE_PAGES.
The following changes are made:
(1) Make the protocol drivers behave according to MSG_MORE, not
MSG_SENDPAGE_NOTLAST. The latter is restricted to turning on MSG_MORE
in the sendpage() wrappers.
(2) Fix ocfs2 to allocate its global protocol buffers with folio_alloc()
rather than kzalloc() so as not to invoke the !sendpage_ok warning in
skb_splice_from_iter().
(3) Make ceph/rds, skb_send_sock, dlm, nvme, smc, ocfs2, drbd and iscsi
use sendmsg(), not sendpage and make them specify MSG_MORE instead of
MSG_SENDPAGE_NOTLAST.
(4) Kill off sendpage and clean up MSG_SENDPAGE_NOTLAST.
I've pushed the patches here also:
https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/log/?h=sendpage-3-killsb
David
Changes
=======
ver #5)
- Switch condition for setting MSG_MORE in write_partial_message_data()
- Split iscsi changes into client and target patches
ver #4)
- Drop the copy-slab-to-fragment code from skb_splice_from_iter().
- Slim down the driver changes to only do one page at a time.
- Drop the siw and drbd page aggregation single-sendmsg patches.
- Make nvme/host cancel MSG_SPLICE_PAGES if !sendpage_ok.
- Break out the ocfs2 protocol buffer allocation fix into its own patch.
- Simplify the ocfs2 protocol data transmission.
ver #3)
- Remove duplicate decl of skb_splice_from_iter().
- In tcp_bpf, reset msg_flags on each iteration to clear MSG_MORE.
- In tcp_bpf, set MSG_MORE if there's more data in the sk_msg.
- Split the nvme patch into host and target patches.
ver #2)
- Wrapped some lines at 80.
- Fixed parameter to put_cpu_ptr() to have an '&'.
- Use "unsigned int" rather than "unsigned".
- Removed duplicate word in comment.
- Filled in the commit message on the last patch.
Link: https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=51c78a4d532efe9543a4df019ff405f05c6157f6 # part 1
Link: https://lore.kernel.org/r/20230616161301.622169-1-dhowells@redhat.com/ # v1
Link: https://lore.kernel.org/r/20230617121146.716077-1-dhowells@redhat.com/ # v2
Link: https://lore.kernel.org/r/20230620145338.1300897-1-dhowells@redhat.com/ # v3
David Howells (16):
tcp_bpf, smc, tls, espintcp, siw: Reduce MSG_SENDPAGE_NOTLAST usage
net: Use sendmsg(MSG_SPLICE_PAGES) not sendpage in skb_send_sock()
ceph: Use sendmsg(MSG_SPLICE_PAGES) rather than sendpage
ceph: Use sendmsg(MSG_SPLICE_PAGES) rather than sendpage()
rds: Use sendmsg(MSG_SPLICE_PAGES) rather than sendpage
dlm: Use sendmsg(MSG_SPLICE_PAGES) rather than sendpage
nvme-tcp: Use sendmsg(MSG_SPLICE_PAGES) rather then sendpage
nvmet-tcp: Use sendmsg(MSG_SPLICE_PAGES) rather then sendpage
smc: Drop smc_sendpage() in favour of smc_sendmsg() + MSG_SPLICE_PAGES
drbd: Use sendmsg(MSG_SPLICE_PAGES) rather than sendpage()
scsi: iscsi_tcp: Use sendmsg(MSG_SPLICE_PAGES) rather than sendpage
scsi: target: iscsi: Use sendmsg(MSG_SPLICE_PAGES) rather than
sendpage
ocfs2: Fix use of slab data with sendpage
ocfs2: Use sendmsg(MSG_SPLICE_PAGES) rather than sendpage()
sock: Remove ->sendpage*() in favour of sendmsg(MSG_SPLICE_PAGES)
net: Kill MSG_SENDPAGE_NOTLAST
Documentation/bpf/map_sockmap.rst | 10 +-
Documentation/filesystems/locking.rst | 2 -
Documentation/filesystems/vfs.rst | 1 -
Documentation/networking/scaling.rst | 4 +-
crypto/af_alg.c | 28 ------
crypto/algif_aead.c | 22 +----
crypto/algif_rng.c | 2 -
crypto/algif_skcipher.c | 14 ---
drivers/block/drbd/drbd_main.c | 12 ++-
drivers/infiniband/sw/siw/siw_qp_tx.c | 5 +-
.../chelsio/inline_crypto/chtls/chtls.h | 2 -
.../chelsio/inline_crypto/chtls/chtls_io.c | 14 ---
.../chelsio/inline_crypto/chtls/chtls_main.c | 1 -
drivers/nvme/host/tcp.c | 49 +++++-----
drivers/nvme/target/tcp.c | 46 ++++++----
drivers/scsi/iscsi_tcp.c | 26 ++----
drivers/scsi/iscsi_tcp.h | 2 -
drivers/target/iscsi/iscsi_target_util.c | 15 +--
fs/dlm/lowcomms.c | 10 +-
fs/nfsd/vfs.c | 2 +-
fs/ocfs2/cluster/tcp.c | 38 ++++----
include/crypto/if_alg.h | 2 -
include/linux/net.h | 8 --
include/linux/socket.h | 4 +-
include/net/inet_common.h | 2 -
include/net/sock.h | 6 --
include/net/tcp.h | 4 -
net/appletalk/ddp.c | 1 -
net/atm/pvc.c | 1 -
net/atm/svc.c | 1 -
net/ax25/af_ax25.c | 1 -
net/caif/caif_socket.c | 2 -
net/can/bcm.c | 1 -
net/can/isotp.c | 1 -
net/can/j1939/socket.c | 1 -
net/can/raw.c | 1 -
net/ceph/messenger_v1.c | 60 ++++--------
net/ceph/messenger_v2.c | 91 ++++---------------
net/core/skbuff.c | 50 +++++-----
net/core/sock.c | 35 +------
net/dccp/ipv4.c | 1 -
net/dccp/ipv6.c | 1 -
net/ieee802154/socket.c | 2 -
net/ipv4/af_inet.c | 21 -----
net/ipv4/tcp.c | 43 +--------
net/ipv4/tcp_bpf.c | 28 +-----
net/ipv4/tcp_ipv4.c | 1 -
net/ipv4/udp.c | 15 ---
net/ipv4/udp_impl.h | 2 -
net/ipv4/udplite.c | 1 -
net/ipv6/af_inet6.c | 3 -
net/ipv6/raw.c | 1 -
net/ipv6/tcp_ipv6.c | 1 -
net/kcm/kcmsock.c | 20 ----
net/key/af_key.c | 1 -
net/l2tp/l2tp_ip.c | 1 -
net/l2tp/l2tp_ip6.c | 1 -
net/llc/af_llc.c | 1 -
net/mctp/af_mctp.c | 1 -
net/mptcp/protocol.c | 2 -
net/netlink/af_netlink.c | 1 -
net/netrom/af_netrom.c | 1 -
net/packet/af_packet.c | 2 -
net/phonet/socket.c | 2 -
net/qrtr/af_qrtr.c | 1 -
net/rds/af_rds.c | 1 -
net/rds/tcp_send.c | 23 ++---
net/rose/af_rose.c | 1 -
net/rxrpc/af_rxrpc.c | 1 -
net/sctp/protocol.c | 1 -
net/smc/af_smc.c | 29 ------
net/smc/smc_stats.c | 2 +-
net/smc/smc_stats.h | 1 -
net/smc/smc_tx.c | 19 +---
net/smc/smc_tx.h | 2 -
net/socket.c | 48 ----------
net/tipc/socket.c | 3 -
net/tls/tls.h | 6 --
net/tls/tls_device.c | 24 +----
net/tls/tls_main.c | 9 +-
net/tls/tls_sw.c | 37 +-------
net/unix/af_unix.c | 19 ----
net/vmw_vsock/af_vsock.c | 3 -
net/x25/af_x25.c | 1 -
net/xdp/xsk.c | 1 -
net/xfrm/espintcp.c | 10 +-
.../perf/trace/beauty/include/linux/socket.h | 1 -
tools/perf/trace/beauty/msg_flags.c | 5 +-
88 files changed, 230 insertions(+), 748 deletions(-)
next reply other threads:[~2023-06-23 22:55 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-23 22:54 David Howells [this message]
2023-06-23 22:54 ` [PATCH net-next v5 01/16] tcp_bpf, smc, tls, espintcp, siw: Reduce MSG_SENDPAGE_NOTLAST usage David Howells
2023-06-23 22:54 ` [PATCH net-next v5 02/16] net: Use sendmsg(MSG_SPLICE_PAGES) not sendpage in skb_send_sock() David Howells
2023-06-23 22:55 ` [PATCH net-next v5 03/16] ceph: Use sendmsg(MSG_SPLICE_PAGES) rather than sendpage David Howells
2023-06-25 12:20 ` Ilya Dryomov
2023-06-26 14:00 ` David Howells
2023-06-26 15:41 ` Ilya Dryomov
2023-06-26 16:44 ` David Howells
2023-06-26 15:12 ` David Howells
2023-06-26 15:52 ` Ilya Dryomov
2023-06-23 22:55 ` [PATCH net-next v5 04/16] ceph: Use sendmsg(MSG_SPLICE_PAGES) rather than sendpage() David Howells
2023-06-25 12:34 ` Ilya Dryomov
2023-06-26 15:30 ` David Howells
2023-06-26 16:07 ` Ilya Dryomov
2023-06-26 17:01 ` David Howells
2023-06-23 22:55 ` [PATCH net-next v5 05/16] rds: Use sendmsg(MSG_SPLICE_PAGES) rather than sendpage David Howells
2023-06-23 22:55 ` [PATCH net-next v5 06/16] dlm: " David Howells
2023-06-23 22:55 ` [PATCH net-next v5 07/16] nvme-tcp: Use sendmsg(MSG_SPLICE_PAGES) rather then sendpage David Howells
2023-06-23 22:55 ` [PATCH net-next v5 08/16] nvmet-tcp: " David Howells
2023-06-23 22:55 ` [PATCH net-next v5 09/16] smc: Drop smc_sendpage() in favour of smc_sendmsg() + MSG_SPLICE_PAGES David Howells
2023-06-23 22:55 ` [PATCH net-next v5 10/16] drbd: Use sendmsg(MSG_SPLICE_PAGES) rather than sendpage() David Howells
2023-06-23 22:55 ` [PATCH net-next v5 11/16] scsi: iscsi_tcp: Use sendmsg(MSG_SPLICE_PAGES) rather than sendpage David Howells
2023-06-27 19:02 ` Chris Leech
2023-06-23 22:55 ` [PATCH net-next v5 12/16] scsi: target: iscsi: " David Howells
2023-06-23 22:55 ` [PATCH net-next v5 13/16] ocfs2: Fix use of slab data with sendpage David Howells
2023-06-23 22:55 ` [PATCH net-next v5 14/16] ocfs2: Use sendmsg(MSG_SPLICE_PAGES) rather than sendpage() David Howells
2023-06-23 22:55 ` [PATCH net-next v5 15/16] sock: Remove ->sendpage*() in favour of sendmsg(MSG_SPLICE_PAGES) David Howells
2023-06-23 22:55 ` [PATCH net-next v5 16/16] net: Kill MSG_SENDPAGE_NOTLAST David Howells
2023-06-24 23:00 ` [PATCH net-next v5 00/16] splice, net: Switch over users of sendpage() and remove it patchwork-bot+netdevbpf
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=20230623225513.2732256-1-dhowells@redhat.com \
--to=dhowells@redhat.com \
--cc=alexander.duyck@gmail.com \
--cc=axboe@kernel.dk \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=willemdebruijn.kernel@gmail.com \
--cc=willy@infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).