readv(), writev()

Mike Muuss mike at BRL.ARPA
Tue Sep 30 14:57:25 AEST 1986


Exactly right.  readv() and writev() allow one to, say, transmit
a packet (header+data) from two separate buffers as one unit,
without needing either (a) extra system calls, or (b) a bcopy().

Small efficiency nit, you say.  True, EXCEPT for the fact that
the 4.2 TCP sets the TCP_PUSH bit at the end of each sys-write.
This can have extreme effects on network performance.

Note that readv() and writev() have a maximum vector length
of 16 items in 4.2 BSD.  You will find this limit strictly enforced
by the kernel, and perplexing to the unwary.
	-Mike



More information about the Comp.unix.wizards mailing list