> An RX batch can make a socket readable while the worker still owns its
> socket lock. Waking a reader at that point can make it immediately wait
> for the same lock.
> 
> For the callback installed by sock_init_data(), record when the existing
> low-watermark condition is met and issue one notification after the batch
> releases the lock. Save the initial sock_def_readable() callback when the
> AF_VSOCK socket is created because virtio_transport_common can be built as
> a module and cannot refer to that unexported symbol directly.
> 
> Require the original protocol and both saved callbacks for batching.
> Sockets with callbacks installed by sockmap or another user retain their
> existing per-packet behavior.
> 
> A psock is published before sockmap replaces the callbacks and is excluded
> by the batch admission checks. If an attach races an active native batch,
> only a packet admitted before that publication can complete on the native
> path; the next packet ends the batch. No queued skb handoff is needed.
> 
> Keep the socket reference until the deferred callback completes. Control
> packets, state transitions, transport changes and non-batched sockets keep
> their existing behavior.
> 
> Signed-off-by: Jia Jia <[email protected]>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review ยท 
https://sashiko.dev/#/patchset/[email protected]?part=4


Reply via email to