On Fri, 26 Jul 2024 17:20:29 +1000
David Gibson <david(a)gibson.dropbear.id.au> wrote:
Currently we set EPOLLET (edge trigger) on the
epoll flags for the
connected Qemu Unix socket. It's not clear that there's a reason for
doing this: for TCP sockets we need to use EPOLLET, because we leave data
in the socket buffers for our flow control handling. That consideration
doesn't apply to the way we handle the qemu socket however.
It significantly decreases epoll_wait() overhead on sustained data
transfers, because we can read multiple TAP_BUF_SIZE buffers at a time
instead of just one.
I can check that now again with current QEMU and kernel versions, plus
several fundamental changes in buffer handling, but I don't see a real
reason why this shouldn't have changed meanwhile.
Surprisingly, this doesn't affect throughput at all on my setup, no
matter the packet size.
I didn't check with perf(1), though, and we probably should give all the
recent substantial changes a pass with it (it's been a while since I
last checked where overhead typically is...).
--
Stefano