> Each received packet updates peer credit and calls sk_write_space() when
> send space is available. A writer cannot use the newly advertised credit
> until the socket lock is released, so repeated callbacks within one lock
> batch cannot let it make progress sooner.
> 
> For the callback installed by sock_init_data(), record one pending
> write-space notification and deliver it through the saved default callback
> before release_sock(). If the callback has been replaced by batch finish,
> invoke the replacement as well. This keeps the native writer wakeup from
> being lost across a sockmap callback change while still notifying sockmap.
> 
> Save the initial sock_def_write_space() callback when the AF_VSOCK socket
> is created because it is not visible to virtio_transport_common when built
> as a module. The fast path uses READ_ONCE() and adds no callback lock.
> 
> Set the batch socket before processing its first packet so a batch ending
> on that packet cannot lose the notification.
> 
> Packets outside the eligible STREAM/RW batch path retain per-packet
> notification behavior. The 64-packet and 64K limits cap the packets whose
> notifications can be coalesced.
> 
> 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