readv: parallel or sequential?

Ivan Voras ivoras at freebsd.org
Fri Dec 7 05:17:22 PST 2007


Dag-Erling Smørgrav wrote:

> But to return to what Ivan was asking, I think what the man page is
> trying to say is that you can't use readv() to e.g. read individual
> network packets into separate buffers (unless each packet just happens
> to fit exactly within each buffer).

What about streaming protocols like TCP? If, for example, I know I have
a N-byte header, N2-byte body, couldn't readv handle it with two iovecs?

But that's not why I started the discussion. I'm looking for a way to do
"scattered" async IO on files (the intention: feed an array of offsets,
lengths and buffers into the kernel, let it perform the requests in
parallel, if it can) and started with this man page.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20071207/f5de81f2/signature.pgp


More information about the freebsd-fs mailing list