apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony Finch <...@dotat.at>
Subject Re: Working platforms - HP-UX 11.00
Date Tue, 20 Feb 2001 01:28:12 GMT
Justin Erenkrantz <jerenkrantz@ebuilt.com> wrote:
>
>apr_sendfile doesn't have an implementation in APR defined for
>HP-UX.  I do know that HP has different sendfile() semantics than 
>Solaris or FreeBSD.  I seem to remember Linus Torvalds mentioning 
>on lkml that HP-UX had "braindamage" in its sendfile implementation:

The problem with sendfile() is the way it is frequently used in
conjunction with write() or writev() -- you use write() to send some
headers and then sendfile() for the bulk data. This usually means that
you get a forced packet boundary between the headers and the file
data, which usually means you aren't making the most of the MTU. HP/UX
addresses this issue by including an iovec in the sendfile() call for
the header; FreeBSD adds a second iovec for the trailer. However this
still leaves you with a forced packet boundary between files. Linux
doesn't include any iovecs in sendfile(); instead you must use
setsockopt(TCP_CORK) to prevent undesired packet boundaries.

Tony.
-- 
f.a.n.finch    fanf@covalent.net    dot@dotat.at
FAIR ISLE: NORTHWEST 5 INCREASING 6 OR 7, OCCASIONALLY GALE 8, BACKING
SOUTHWEST FOR A TIME. RAIN THEN SHOWERS. MODERATE OR GOOD.

Mime
View raw message