mirror of
https://github.com/SerenityOS/serenity
synced 2026-05-12 09:57:00 +02:00
This implementation currently aborts the whole transfer instead of
caching pending packets in the kernel (see also #22524).
We currently don't have a mechanism for caching pending packets in
general and instead rely on userspace retrying the sendmsg syscall
if the returned number of bytes sent is smaller than expected.
However, 2bec281ddc made sys$sendmsg return an error (sys$write and
sys$pwritev catch this error and retry), causing applications like
WebServer to print an error instead of retrying the send operation.
So fixing Nagle's algorithm for sys$sendmsg requires adding a pending
packet cache in the kernel.
For sys$write and sys$pwritev we currently busy loop in the kernel until
we sent all bytes of the packet. This isn't really ideal either and
especially problematic for Nagle's algorithm.