Re: [PATCH 1/3] net: Remove support for AIO on sockets
Christoph Hellwig <[email protected]>
| Newsgroups | org.kernel.vger.linux-api,org.kernel.vger.io-uring,org.kernel.vger.linux-crypto,org.kernel.vger.linux-doc,org.kernel.vger.linux-kernel,org.kernel.vger.linux-perf-users,org.kernel.vger.netdev |
|---|---|
| Message-ID | <[email protected]> |
On Sat, May 23, 2026 at 03:43:02PM -0400, Demi Marie Obenour via B4 Relay wrote: > From: Demi Marie Obenour <[email protected]> > > The only user of msg->msg_iocb was AF_ALG, but that's deprecated. > It can be removed entirely at the cost of only supporting synchronous > operations. This doesn't break userspace, which will silently block > (for a bounded amount of time) in io_submit instead of operating > asynchronously. > > This also makes struct msghdr smaller, helping every other caller of > sendmsg(). So we just had a discussion at LLC about how networking needs to support AIO better for zero copy. The current TCP zerocopy implementation provides completion notification through the socket error code, which is freaking weird and doesn't integrate well with either io_uring or in-kernel callers. So we really want to pass the iocb down into networking and have it call ki_complete on completion, with something higher up in the stack adding that to the error queue for the legacy user interface. Now I'm not sure if we wouldn't be better off passing that iocb explicitly instead of in a weird hidden way, but this seemed like a good place to bring this up.