Re: [Fwd: [Fwd: Is sendfile all that sexy? (fwd)]]

From: Andrea Arcangeli (andrea@suse.de)
Date: Sat Jan 20 2001 - 16:05:21 EST


On Sat, Jan 20, 2001 at 10:39:36PM +0300, kuznet@ms2.inr.ac.ru wrote:
> Much saner behaviour wrt latency (and perfect clarity) overweights

IMHO latency can be fixed in a much better way using ioctl(SIOCPUSH) after the
last write() plus we could also add a MSG_NOMORE to set in the last send().
MSG_NOMORE would be not anonymous-capable but it would have zero syscall cost
compared to SIOCPUSH.

This would also address when the stack still delays something by mistake, and
yes it must still delay something sometime (even if not in my example)
otherwise setsockopt(TCP_NODELAY) is a noop. Whatever heuristic you use it
can't get right all the cases because it misses information that it can't
recover by guessing the right thing to do. Legacy userspace will run still
fine, optimized software will take advantage of the new capability of the
stack.

In short instead of decreasing merging capabilities of the stack IMHO it's
better to give the information from userspace to the stack to let it know when
it must stop to do merging. This way the stack will always do the right thing.

Andrea
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Jan 23 2001 - 21:00:23 EST