io_uring/msg_ring: improve handling of target CQE posting
authorJens Axboe <axboe@kernel.dk>
Thu, 28 Mar 2024 17:00:21 +0000 (11:00 -0600)
committerJens Axboe <axboe@kernel.dk>
Tue, 18 Jun 2024 18:41:35 +0000 (12:41 -0600)
commitaa72733ed0b42b7d25e251528702907ffe785e24
tree570b14a4fe321f45d330d09f11ae9649e2b3e733
parent6e1443a9ee02e2215e71259782448c8c66fec0c2
io_uring/msg_ring: improve handling of target CQE posting

Use the exported helper for queueing task_work for message passing,
rather than rolling our own.

Note that this is only done for strict data messages for now, file
descriptor passing messages still rely on the kernel task_work. It could
get converted at some point if it's performance critical.

This improves peak performance of message passing by about 5x in some
basic testing, with 2 threads just sending messages to each other.
Before this change, it was capped at around 700K/sec, with the change
it's at over 4M/sec.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/msg_ring.c