4 ms·
I should fix the interaction between “Nagle algorithm” and “delayed ACKs” (2006)
- amluto 4y agoI wonder if this could be improved with more feedback from applications to the kernel. The kernel has a decent idea of whether an application will receive a message from a socket in a timely manner (is it in poll or select or is epoll enabled? Or even just: is the receive buffer empty when data is received?). And the application knows, when it receives data, whether it will reply. So a socket ioctl or similar saying “hey, I did recv() but I’m not about to send()” would be a good hint to send an ACK. Maybe a TCP stack could also guess based on the application going back to sleep, but that involves nasty heuristics and might be impossible with something like io_uring or io completion ports.