Article View: linux.kernel.netdev
Article #23353[PATCH net-next v6 0/2] vsock/virtio: reduce RX per-packet socket overhead
From: Jia Jia
Date: Fri, 27 Nov 2026 06:26
Date: Fri, 27 Nov 2026 06:26
104 lines
15772 bytes
15772 bytes
This series reduces per-packet socket overhead in the virtio-vsock RX
worker.
Patch 1 separates socket lookup from processing under the socket lock.
Patch 2 retains one socket lookup reference and socket lock across a
bounded run of established STREAM/RW packets for the same native socket.
Performance:
The measurements below cover both patches. Throughput uses vsock_perf as
the host sender and a custom single-threaded blocking receiver in the
Guest, with the receiver on CPU0 and the virtio-vsock IRQ/RX worker on
CPU1. Each row has 16 accepted, balanced AB/BA pairs and a fresh Guest per
state. The fixed-syscall campaign was collected separately; each table
compares paired baseline and series runs from its own campaign. The host
uses vhost-vsock.
Accepted runs also passed byte-integrity, CPU-affinity/migration,
IRQ-activity, host/Guest steal, I/O-wait and swap, sentinel,
kernel-diagnostic, and applicable perf-validity checks.
End-to-end RX throughput
(64K Guest recv() size, SO_RCVLOWAT=1; Gbit/s):
payload baseline RX series RX throughput change (95% CI)
(Gbit/s) (Gbit/s)
64B 0.1212 0.2555 +110.81% [+106.99%, +114.70%]
256B 0.5551 1.0212 +83.95% [+79.94%, +88.06%]
512B 1.0568 1.8761 +77.53% [+73.02%, +82.15%]
1K 1.9260 3.1453 +63.31% [+58.58%, +68.17%]
4K 3.5175 6.3239 +79.78% [+72.79%, +87.06%]
8K 4.1183 5.6867 +38.08% [+31.06%, +45.48%]
16K 5.0155 6.8346 +36.27% [+31.12%, +41.62%]
64K 5.0541 5.8403 +15.56% [+11.12%, +20.17%]
Fixed-syscall stress test
(receiver recv() size = sender write size; Gbit/s):
payload baseline RX series RX throughput change (95% CI)
(Gbit/s) (Gbit/s)
64B 0.1435 0.2750 +91.60% [+82.19%, +101.50%]
recv() calls (baseline/series): 1048577/1048577
256B 0.4218 0.9659 +129.00% [+110.65%, +148.95%]
recv() calls (baseline/series): 1048577/1048577
512B 0.8062 1.6979 +110.60% [+94.49%, +128.04%]
recv() calls (baseline/series): 1048577/1048577
1K 1.5116 2.9585 +95.72% [+85.22%, +106.82%]
recv() calls (baseline/series): 1048577/1048577
4K 2.9234 6.3365 +116.75% [+110.78%, +122.89%]
recv() calls (baseline/series): 538537/525565
8K 4.0430 7.1193 +76.09% [+69.04%, +83.44%]
recv() calls (baseline/series): 276901/264412
16K 4.9182 7.7688 +57.96% [+54.40%, +61.60%]
recv() calls (baseline/series): 147674/132088
64K 5.6683 7.1636 +26.38% [+20.49%, +32.56%]
recv() calls (baseline/series): 50615/33343
Request-response latency
(ping-pong RTT, 10,000 requests per state):
payload baseline mean RTT series mean RTT change (95% CI)
(us) (us)
64B 121.067 120.977 -0.07% [-2.45%, +2.36%]
256B 120.733 120.809 +0.06% [-1.69%, +1.85%]
4K 123.161 121.525 -1.33% [-2.87%, +0.24%]
---
Compared with v5, the performance suite was rerun with stricter validity
gates, including host/Guest scheduling, steal, I/O-wait and swap
monitoring, plus QEMU affinity and migration checks. Runs affected by these
sources of noise were rejected, so the current results better isolate the
RX batching improvement.
Changes since v5:
- keep patch 1 unchanged apart from Stefano's blank-line nit, and add his
Reviewed-by tag
- drop the metadata-budget helper and the rx_buf_full() batch boundary
- apply Bobby's receive tracepoint refactor in the batching patch
- remove the locked helper's batch-specific parameters; return packet
validation status and keep the continuation check in the batch caller
- keep sockmap eligibility checks at packet boundaries without taking
sk_callback_lock
- move notification coalescing and deferral to a separate follow-up series
- update the performance measurements and add fixed-syscall stress results
v5: https://lore.kernel.org/netdev/20261103041134.33310-1-physicalmtea@gmail.com/
Jia Jia (2):
vsock/virtio: split socket lookup from locked RX processing
vsock/virtio: amortize RX socket locking for stream packets
include/linux/virtio_vsock.h | 23 ++
.../events/vsock_virtio_transport_common.h | 40 +-
net/vmw_vsock/virtio_transport.c | 7 +-
net/vmw_vsock/virtio_transport_common.c | 368 +++++++++++++++---
4 files changed, 359 insertions(+), 79 deletions(-)
base-commit: 8df0638138d3e0344fd1fb36cf2d1ca1cf5028f0
--
2.53.0
Technical Details
Message-ID:
<20261127062700.29387-1-physicalmtea@gmail.com>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-372480-linux-kernel-netdev=dewy.ruShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-372480-linux-kernel-netdev=dewy.ru
From: physicalmtea@gmail.com (Jia Jia)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net-next v6 0/2] vsock/virtio: reduce RX per-packet socket overhead
Date: Fri, 27 Nov 2026 06:26:58 +0000
Organization: Usenet Network
Message-ID: <20261127062700.29387-1-physicalmtea@gmail.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
logging-data="657272"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:ibuD9rXPnrQUbx3T+SQZxJJzEsA= sha256:+KLp66WEfHAcOrvjAX+dDSOoQGhwxm6buhcUT1nS+UQ=
sha1:X3Hc/Rptc4W9x9y1NaCZhADFD0E= sha256:n6WlfIXCsovDDI9hD8LvJHjF/Ehk03Em4ywS1HFwhpE=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
by mail.dewy.ru (Postfix) with ESMTP id 35616125F13; Fri, 27 Nov 2026 09:27:46 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.049
X-Spam-Status: No, score=-3.049 tagged_above=-9999 required=6.31
tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001,
FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
header.d=gmail.com
X-Received: from mail.dewy.ru ([127.0.0.1])
by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id 0Z4IPBzWKh5P;
Fri, 27 Nov 2026 09:27:42 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-372480-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
by mail.dewy.ru (Postfix) with ESMTPS id 1660A125F12; Fri, 27 Nov 2026 09:27:31 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by sea.lore.kernel.org (Postfix) with ESMTP id F0DCD363C7; Fri, 27 Nov 2026 06:27:26 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1795760845;
b=VDp6R9569++7SNAwnFdpSl/V40GPuUdMy1pvkPFbrVY9OFXJ05liVOYLcw1ZSXNiqWXG
3Y7eF3huTO1T54fFka+gvsrgQ/T2QqmWK/+KVD4vUnruQHt90C93h4tKHqOrKgLGCvzKm
L6T3srEnklb2Gv3/SIOgK0EKLbpoSjnSiPwbUgkCZctKsXzh8ASjNxkVY2++Su+j0gYMh
kyqhKVblZQyg//DwF3OwS/9/8f3h6dSpj9ILbPPCld9FM9ghMFhIhpHeiKCBl3AwuJvl2
k1nowk86cvlINRbWq/P6q3bsPbnnP4CRXCKA7A2HC+pV0K/JjTTLDm+JWoxONZKIriA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1795760845;
h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
X-Google-DKIM-Signature:X-Forwarded-Encrypted:X-Gm-Message-State:
X-Gm-Gg:X-Received:Received:From:To:Cc:Subject:Date:Message-ID:
X-Mailer:X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
List-Unsubscribe:List-Owner:Precedence:MIME-Version:
Content-Transfer-Encoding;
bh=r8lJaPpRGy7TrFULAZGwfuDH5/Bcxre2ZiVQp9kvtDA=;
b=avdYSpz8596XO6WuU7sjfQDBboKRpWS7apSYSWPvAdWszAGOldC2DZkDg0AIE6gcwzgZ
gwbnZzHCgnEtSb2KgpC4X325X4VEdjMSZVXy3NFqoqwp43Ag/f6rNlXsFo+gMKXR6DBCv
U0oEHMHf5Qiw5bxdu+sWJQvAFurooEyxXnhUb3OrXeg88UQGVUAx/Dqk6bNqz3SCuSNVt
kcXnzIuxxZX96YsXLyRdkR0Nt2FfuFIeCpC5ggaaVeiaqZ8V6fPhmhx2EYcZ17S1okPOu
iVLNMUyJoLT5UiHaTcDZHxjpwUAh1E2JwjH9WuA0eOMYNWILJUx+Jq/iuxiDeiDq1mw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=h2wcE6NG;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 35765606A333;
Fri, 27 Nov 2026 06:27:25 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=h2wcE6NG
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.215.180
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1795760844;
b=H8N4qJ6x8jFfRCvIWGojTPgbWm5UQtM8B9LgWwRV9acMbuBH58mRM5fW7Wb6f93AXhPt
dgLLo27t4xapv/sNhDDvhYQJ43Gk0zAC0j2+KAYk5I0fwP3SCcFmxiEr0vM/1mp5908Hq
mA5TbNPItMeiTEoMLQMUqYIlG1dyKc46s2HA+Io4trowhkaYY+XxSixEUcLNtLWQxMGWj
ste698cTN0smxuRLyGwnEkUTKkxzEsbhJWAYX0upU4Dl1sGfyoHeREzw50Jt42MCsVWh/
QCTMKmwJbeZEpYMKaLjqtB7mTkAuV7lNuu9yPLPUBMmaDBQwUP60PbetDiN97190k5w==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1795760844;
h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received:
From:To:Cc:Subject:Date:Message-ID:X-Mailer:MIME-Version:
Content-Transfer-Encoding;
bh=r8lJaPpRGy7TrFULAZGwfuDH5/Bcxre2ZiVQp9kvtDA=;
b=qmjQDbkGQw1TRAdIRm7PJl4dSNsVEnV9nIm0ztNbVmXQE3iC4wSIY+VOiDt49I+E74Zx
smspoCDIbjgRfz9/TPE0HpLXRZQ6txYZNZ2epISfgnXgf8bNhbN05qNNwNL7ZFESL3J8G
VANCvpZC073IjMsvFxMRaPvojh1kTTwtSW1TZomoybnVXIKIof3asAE2KPcylpjOIntdf
r9PLeUPhZ1mRJ6R1KBFQXb4qM/pNs6AEHjOgmNN02bOlWY3OB4prSbALOqw0uCSMvo99y
QCptmYfFNqIWKnbczg/2SDugpXytwmq2J6S9Av6V+iY5VLFHtDVIgE8SLaE552nDxeg==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=h2wcE6NG;
arc=none smtp.remote-ip=209.85.215.180
X-Received: from mail-pg1-f180.google.com (mail-pg1-f180.google.com [209.85.215.180])
(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 08D98606A321
for <netdev@vger.kernel.org>; Fri, 27 Nov 2026 06:27:23 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 08D98606A321
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-pg1-f180.google.com with SMTP id 41be03b00d2f7-cdb9f760337so4238715a12.0
for <netdev@vger.kernel.org>; Thu, 26 Nov 2026 22:27:23 -0800 (PST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20260707; t=1795760843; x=1796365643; darn=vger.kernel.org;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:from:to:cc:subject:date:message-id:reply-to:content-type;
bh=r8lJaPpRGy7TrFULAZGwfuDH5/Bcxre2ZiVQp9kvtDA=;
b=h2wcE6NGOT6lcpof0NQ3QQvjDAEV3HVb/OX7qUM07T6ClyUGjfqItQxVv6xJuKfqma
mcKXupf4E5BluokYklLLjO1QFIAfLuQAosn3HuE46o+gvByTEYnMUEwEBN56nwTqJvJd
yyyjYNmLR03MvyoAq0uCgSSdLwxGbNVzfv9M46uEiZ61KRm2NCvcz/3VAoKD/t4SlJKM
uhE+lRu9b0myEQU602QkaSVBVYC+AhYNrJ26X/KtKsKtDiXGdyRy+vn807/zkkzrQTKQ
+g/5m+MWju2+hA5vVenvFiry/02T/yKbAiYYuUENPJIv8qZ9BhAXwjARpGuqu5w+I74i
5+2g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1795760843; x=1796365643;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date
:message-id:reply-to:content-type;
bh=r8lJaPpRGy7TrFULAZGwfuDH5/Bcxre2ZiVQp9kvtDA=;
b=z/WxCQVKIStbVZztHkqttAFoFqu/5TbdsC+cFYDdjq/ApsyivLX9yPSHwDJnNo66MA
aCL5rxe+sPNu5mpnPqx3L/pY1sVd2an4PLtReX+ZqAwQ1QLW7oEUFLPcw5slPNQ/qBBx
sejjBS22GugVKWNNUenpNbgv8Emx3HWSuBDpBquEVYs8GsWHfQtzHpJLLaKgm/Ztfyma
oMFbGXV7RudMgT3HrBbq39WAKt77TkdMh/WnXFL6QLDaFlzKfPWApHnB/7roZ43i6bGd
pMZ3brPb3mo6wpTwjI87bGVp6GHfOW+T57Yvnfbom9K22e80e245ORxfWJxBHGRjISOr
SPrA==
X-Forwarded-Encrypted: i=1; AL+hErGGdR9sSX1azjBkYfP+Jc0aztJAudCtQfCdmQ4XU+OQiWJy2NtwwN1IbC8yIGdbYHPdB70KD4s=@vger.kernel.org
X-Gm-Message-State: APuU4Z/hwMeLzcf0ZWTW9JpYsqMFaq3GLqYH/gxmxq/JGbPd50p0VKYR
6TNm+ehw4Jhs9QlSNKkEmYtl2E3Gb3wS7i7nHdEYYexjfQ7Spjc/yvkR
X-Gm-Gg: AZFdTZekjbiII6LEdVCDHi+hNQP9rEEFIcsqosrDoNkibkYsPFxw9ntbTuwfd0nIAgf
olTq9VRFR+gkJCu0x+9oKnIDtPna2MC+hkAXKcF88uM5/lZCkOxO59gwczWx5XnT9GV2N/b7MRk
iiYbHRjnTrI0I76kXzbOb2yd+8oUiBeN1J/3oX4nUPGetbrPzndYcKO7UT6e8TvBk3S9SQkD2Ga
WFdK+DXgm23YdG7nIW0vSFzfefsDBN+D1dKv1Sx3ff6ws+2I3nte/+V9Lvv7fgxUjG0OuvbH6Q7
0FgF0W3umwr/EvMdoM0foCh50UHb3M8uBJiKrSkLiFWGUDtI+ejoLjgRT0unqHTJo+ddAGXicbO
qWfkEIbGa+XuCWlvZ6xSmYGcFaCQqXFG1I9NtQp1xgqQ9A5wDVNGrNcgsgV8Ze+v4gGy98P4u3i
vRam7yOs/sc1sqEe3NfNZHhY3P1sBQI2e8cj/CclghXCjZE7nwKX7kiCzJe0L88vYpK44J7a16X
KO1Xs8L5g3ClcSFk6p99trv9bWCRqxBIRtHIHBcIHH84Bu1kkMP/oKM65AULoTbOPf+vI5hTp+t
gNs/j17oyrXz9lNyEaErwh2S9lLB
X-Received: by 2002:a17:90b:2e8c:b0:3ac:a6a5:5757 with SMTP id 98e67ed59e1d1-3b41c8df55amr15467243a91.11.1795760843097;
Thu, 26 Nov 2026 22:27:23 -0800 (PST)
X-Received: from dbg-srv ([111.194.74.218])
by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3b44b82e624sm15986522a91.4.2026.11.26.22.27.17
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Thu, 26 Nov 2026 22:27:22 -0800 (PST)
X-Cc: "Michael S . Tsirkin" <mst@redhat.com>,
Jason Wang <jasowangio@gmail.com>,
Eugenio PΓ©rez <eperezma@redhat.com>,
Xuan Zhuo <xuanzhuo@linux.alibaba.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
Steven Rostedt <rostedt@goodmis.org>,
Masami Hiramatsu <mhiramat@kernel.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>,
virtualization@lists.linux.dev,
kvm@vger.kernel.org,
netdev@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-trace-kernel@vger.kernel.org
X-Mailer: git-send-email 2.53.0
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list