[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240701-pinna-v2-0-ac396d181f59@outlook.com>
Date: Mon, 01 Jul 2024 16:28:01 +0200
From: Luigi Leonardi via B4 Relay <devnull+luigi.leonardi.outlook.com@...nel.org>
To: Stefan Hajnoczi <stefanha@...hat.com>,
Stefano Garzarella <sgarzare@...hat.com>,
"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>
Cc: kvm@...r.kernel.org, virtualization@...ts.linux.dev,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
Luigi Leonardi <luigi.leonardi@...look.com>,
Marco Pinna <marco.pinn95@...il.com>
Subject: [PATCH net-next v2 0/2] vsock: avoid queuing on workqueue if
possible
This series introduces an optimization for vsock/virtio to reduce latency:
When the guest sends a packet to the host, and the workqueue is empty,
if there is enough space, the packet is put directly in the virtqueue.
In this v2 I replaced a mutex_lock with a mutex_trylock because it was inside
a RCU critical section. I also added a check on tx_run, so if the
module is being removed the packet is not queued. I'd like to thank Stefano
for reporting the tx_run issue.
v1->v2
Applied all Stefano's suggestions:
- Minor code style changes
- Minor commit text rewrite
Performed more experiments:
- Check if all the packets go directly to the vq (Matias' suggestion)
- Used iperf3 to see if there is any improvement in overall throughput
from guest to host
- Pinned the vhost process to a pCPU.
- Run fio using 512B payload
Rebased on latest net-next
Signed-off-by: Luigi Leonardi <luigi.leonardi@...look.com>
---
Marco Pinna (2):
vsock/virtio: refactor virtio_transport_send_pkt_work
vsock/virtio: avoid enqueue packets when work queue is empty
net/vmw_vsock/virtio_transport.c | 171 +++++++++++++++++++++++++--------------
1 file changed, 109 insertions(+), 62 deletions(-)
---
base-commit: 2e7b471121b09e7fa8ffb437bfa0e59d13f96053
change-id: 20240701-pinna-611e8b6cdda0
Best regards,
--
Luigi Leonardi <luigi.leonardi@...look.com>
Powered by blists - more mailing lists