During high-frequency packet transmission, if vhost immediately notifies
virtio driver after reading the virtio_queue empty, virtio driver will
perform a kick after sending the next packet. However, if vhost waits a
little longer, it could get the next packet sent by virtio driver
without the need for virtio to perform a kick.
This patch optimizes for this issue. If the TX interval recently recorded
by vhost-net is within 50us, it is considered a high-frequency packet
sending. At this time, after detecting the virtio_queue is empty, vhost-net
will wait for new packets to arrive before notifing the virtio driver.
Xu Kuohai (2):
vhost_net: Suppress kick ratio when high frequency TX detected
openeuler: vhost_net: Enable vhost net polling for openeuler arm64 and
x86
arch/arm64/configs/openeuler_defconfig | 2 +
arch/x86/configs/openeuler_defconfig | 2 +
drivers/vhost/Kconfig | 22 +++++++++
drivers/vhost/net.c | 66 ++++++++++++++++++++++++++
4 files changed, 92 insertions(+)
--
2.30.2