From: Paolo Abeni > Sent: 02 February 2021 10:19 ... > Note that you can already process several packets with a single syscall > using sendmmsg/recvmmsg. Both have issues with error reporting and > timeout and IIRC still don't amortize the overhead introduced e.g. by > CONFIG_HARDENED_USERCOPY.
Both CONFIG_HARDENED_USERCOPY and the extra user copies needed even for sendmsg() over send() are definitely measurable. I've run tests using _copy_from_user() for many of the copies. Even the cost of reading in a single iov[] for the buffer affects things. My last attempt at speeding up writev("/dev/null", iov, 10) fell into the rabbit hole of io_uring (again). But the partial changes gave a few % improvement. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)