From: sashiko-bot@kernel.org
To: physicalmtea@gmail.com
Cc: kvm@vger.kernel.org, virtualization@lists.linux.dev,
"Eugenio Perez" <eperezma@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [PATCH 2/5] vsock: amortize RX socket locking for stream packets
Date: Sat, 03 Oct 2026 07:46:54 +0000 [thread overview]
Message-ID: <20261003074655.22DE01F0089C@smtp.kernel.org> (raw)
In-Reply-To: <20261002074551.318789-3-physicalmtea@gmail.com>
> From: Jia Jia <physicalmtea@gmail.com>
>
> The virtio-vsock RX worker currently acquires and releases the socket lock
> for every received packet. Keep the lock held while processing a bounded
> run of packets that belongs to the same socket.
>
> Only ordinary RW packets for an established STREAM socket whose transport
> and protocol remain unchanged are eligible. Control packets, SEQPACKET
> traffic, state or transport changes, malformed packets, and sockets whose
> protocol has been replaced end the active batch and retain their existing
> handling.
>
> Serialize the initial eligibility check with sk_callback_lock because
> sockmap removal restores the protocol without taking the socket lock.
>
> Limit each batch to 64 packets or 64K of payload to bound the work
> performed under one socket lock. Keep the lookup reference until the batch
> finishes.
>
> The virtqueue callback remains a queue_work() callback. Batching runs only
> in the process-context RX worker.
>
> Introduce virtio_transport_rx_batch_finish() to tear down the batch and
> release the socket lock and lookup reference.
>
> 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/20261002074551.318789-1-physicalmtea@gmail.com?part=2
prev parent reply other threads:[~2026-10-03 7:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-02 7:45 [PATCH 2/5] vsock: amortize RX socket locking for stream packets physicalmtea
2026-10-03 7:46 ` sashiko-bot [this message]
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=20261003074655.22DE01F0089C@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=eperezma@redhat.com \
--cc=kvm@vger.kernel.org \
--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