> 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(). Save that callback when the AF_VSOCK socket is > created because it is not visible to virtio_transport_common when built as > a module. > > Keep only sockets using the saved callback eligible for batching. Sockets > whose callback has been replaced, including sockmap sockets, retain their > existing per-packet notification behavior. The psock marker checked by the > batch admission path also excludes a socket before sockmap replaces this > callback. > > 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 64KB 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=3
