apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Bloom <...@covalent.net>
Subject Re: proposed change to reduce nonblocking socket performance overhead
Date Mon, 10 Dec 2001 14:30:10 GMT
On Sunday 09 December 2001 09:00 pm, Brian Pane wrote:
> Ryan Bloom wrote:
> >On Sunday 09 December 2001 06:55 pm, Brian Pane wrote:
> .....
> >Yeah, unfortunately some platforms do inherit these flags.
> >
> >Can we improve the performance by only doing the F_GETFL
> >once though?  If we do it once, and cache the results in the
> >apr_sockopt, we should be safe.  Then the only problem is that we
> >have to keep them up to date whenever we use F_SETFL, but I think
> >we can handle that.
> That would work in general, although in the case of Apache
> it's the very first F_SETFL after the accept that's the
> problem.  Is it feasible to ifdef the platforms where the
> flags are inherited, so that we can optimize away this first
> F_GETFL on the platforms where it's safe (and optimize away
> the second F_GETFL on the platforms that do inherit the flag)?

Unfortunately, it's not easy to determine which platforms have this
feature.  We could write an autoconf script, but it wouldn't be the
most robust script, just because of how it would have to work.

> Alternately, how about an API for "set this socket to
> nonblocking and clear any other fcntl flags that might
> be set"?  That would allow us to duplicate the behavior
> of 1.3.x, which just does the F_SETFL without the F_GETFL.

That should be possible to do.


Ryan Bloom				rbb@apache.org
Covalent Technologies			rbb@covalent.net

View raw message