From: sashiko-bot@kernel.org
To: "Jia Jia" <physicalmtea@gmail.com>
Cc: virtualization@lists.linux.dev,
"Michael S. Tsirkin" <mst@redhat.com>,
"Eugenio Perez" <eperezma@redhat.com>
Subject: Re: [PATCH net-next v4 2/4] vsock/virtio: amortize RX socket locking for stream packets
Date: Wed, 14 Oct 2026 12:15:13 +0000 [thread overview]
Message-ID: <sashiko-outbox-171251@kernel.org> (raw)
In-Reply-To: <20261014115640.184286-3-physicalmtea@gmail.com>
> The virtio-vsock RX worker currently looks up the socket and takes its
> lock for every packet. Keep the socket lock and lookup reference across a
> bounded run of STREAM/RW packets for the same established socket.
>
> Reuse the locked socket while packets continue to match the same flow.
> End the batch for a different flow, non-RW traffic, malformed packets, or
> a change in socket state, transport, protocol, or receive-buffer headroom.
> A connected-table miss uses the existing receive path.
>
> The reused path still traces every packet, takes an skb owner reference,
> validates the source and transport, updates credit, and runs the existing
> receive state machine.
>
> Sockmap can replace the protocol without taking the socket lock. Check the
> psock marker at each packet boundary and serialize initial admission with
> sk_callback_lock, so a concurrent attach ends batching at the next packet.
>
> Cap a batch at 64 packets and 64K of payload. The packet limit bounds
> per-packet work, while the byte limit bounds how much data can queue before
> a reader acquires the socket lock. Batching remains in the process-context
> RX worker.
>
> Signed-off-by: Jia Jia <physicalmtea@gmail.com>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261014115640.184286-1-physicalmtea@gmail.com?part=2
next prev parent reply other threads:[~2026-10-14 12:15 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-14 11:56 [PATCH net-next v4 0/4] vsock/virtio: reduce RX per-packet socket overhead Jia Jia
2026-10-14 11:56 ` [PATCH net-next v4 1/4] vsock/virtio: split socket lookup from locked RX processing Jia Jia
2026-10-14 12:15 ` sashiko-bot
2026-10-16 13:47 ` Stefano Garzarella
2026-10-16 14:31 ` Bobby Eshleman
2026-10-18 4:42 ` Jia Jia
2026-10-14 11:56 ` [PATCH net-next v4 2/4] vsock/virtio: amortize RX socket locking for stream packets Jia Jia
2026-10-14 12:15 ` sashiko-bot [this message]
2026-10-16 14:33 ` Stefano Garzarella
2026-10-18 4:52 ` Jia Jia
2026-10-19 14:05 ` Stefano Garzarella
2026-10-14 11:56 ` [PATCH net-next v4 3/4] vsock/virtio: coalesce RX write-space notifications in lock batches Jia Jia
2026-10-14 12:15 ` sashiko-bot
2026-10-16 14:07 ` Bobby Eshleman
2026-10-18 4:58 ` Jia Jia
2026-10-16 14:40 ` Stefano Garzarella
2026-10-18 4:54 ` Jia Jia
2026-10-19 14:10 ` Stefano Garzarella
2026-10-14 11:56 ` [PATCH net-next v4 4/4] vsock/virtio: defer RX notifications until batch unlock Jia Jia
2026-10-14 12:15 ` sashiko-bot
2026-10-16 14:42 ` Stefano Garzarella
2026-10-18 4:55 ` Jia Jia
2026-10-19 14:11 ` Stefano Garzarella
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-171251@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=eperezma@redhat.com \
--cc=mst@redhat.com \
--cc=physicalmtea@gmail.com \
--cc=sashiko-reviews@lists.linux.dev \
--cc=virtualization@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox