[PATCHSET for-next] Add alloc cache for sendmsg/recvmsg

Jens Axboe
2022-07-07T23:24:21Z

Hi,

This abstracts out the alloc cache we have for apoll entries, and extends
it to be usable for recv/sendmsg as well. During that abstraction, impose
an upper limit for cached entries as well.

This yields a 4-5% performance increase running netbench using
sendmsg/recvmsg rather than plan send and recv.

Post 5.20, I suspect we can get rid of using io_async_msghdr for single
vector sendmsg/recvmsg, which will make this less relevant. But as this
work isn't done yet, and the support for eg ITER_UBUF isn't upstream yet
either, this can help fill the gap.

--
Jens Axboe