apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Erenkrantz <jus...@erenkrantz.com>
Subject Re: do we still want sendfile enabled with our default conf files?
Date Fri, 18 Mar 2005 16:23:18 GMT
--On Friday, March 18, 2005 11:12 AM -0500 Ryan Bloom <rbloom@gmail.com> wrote:

> funny, I took the list of exceptions to be so large and hard to
> maintain that it made more sense to go with Jeff's original idea of
> just disabling sendfile by default unless a user specifically decided
> to enable it.  I just had to debug a problem for a friend with
> sendfile on Linux.  I don't know what caused the problem, but
> disabling sendfile solved it immediately.  Seems to me that until our
> sendfile support is better, we should err on the side of always
> sending the data correctly instead of absolutely as fast as possible.

I absolutely refuse to punish users who are using good OSes because some OSes 
are brain-dead.  This is exactly the role that APR is meant to fill: if we 
know of conditions where it is unsafe to use sendfile, we won't use it unless 
explicitly told so by the user.

The minimal check can be:

if (flags & APR_SENDFILE_CHECK) {
#ifdef LINUX || WIN32 || AIX || HPUX
    return APR_ENOTIMPL;
#endif
}

As people determine what conditions sendfile is safe (or causes problems), 
then we can add those.

Feel free to advocate Linux always returning APR_ENOTIMPL for sendfile - I 
don't care.  However, blocking sendfile on non-buggy OSes is not a solution 
that I am willing to sign off on.  -- justin

Mime
View raw message