From dev-return-6691-apmail-apr-dev-archive=apr.apache.org@apr.apache.org Wed Jun 05 16:12:33 2002
Return-Path:
Delivered-To: apmail-apr-dev-archive@apr.apache.org
Received: (qmail 73330 invoked by uid 500); 5 Jun 2002 16:12:32 -0000
Mailing-List: contact dev-help@apr.apache.org; run by ezmlm
Precedence: bulk
List-Post:
List-Help:
List-Unsubscribe:
List-Subscribe:
Delivered-To: mailing list dev@apr.apache.org
Received: (qmail 73312 invoked from network); 5 Jun 2002 16:12:32 -0000
Errors-To:
Message-Id: <5.1.0.14.2.20020605110853.01f0b6d8@pop3.rowe-clan.net>
X-Sender: wrowe%rowe-clan.net@pop3.rowe-clan.net
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Wed, 05 Jun 2002 11:13:53 -0500
To: dev@apr.apache.org
From: "William A. Rowe, Jr."
Subject: Re: [PATCH] WIN32 implementation of apr_poll_revents_get()
In-Reply-To: <008e01c20caa$6db00120$16381b09@sashimi>
References: <20020604185433.85845.qmail@web20501.mail.yahoo.com>
<005e01c20c46$266f0810$82db26cb@saxon>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N
At 11:02 AM 6/5/2002, FirstBill wrote:
> > > Also, I considered first using a flag in the apr_socket_t structure,
> but my
> > > problem is that there is already one: 'disconnected'. I would use this
> > > flag, but after many review of the code, I still don't know the
> utility of
> > > this flag.
>
>Has to do with a performance tweak on Windows. AcceptEx() accepts as
>arguments two
>sockets, the listener and an unconnected accept socket. Creating a new
>accept socket (with
>a call to socket()) is very expensive on Windows (the call has to
>percolate through many
>layers of service providers each deciding if they should handle the call).
>Some of the
>Win32 socket calls enable you to recycle the accept socket (TransmitFile
>for instance.).
>If you tell TransmitFile to disconnect the accept socket, it can be reused
>on the AcceptEx
>call and this is good for a double digit performance boost serving
>non-keepalive requests.
>Check out mpm_winnt.c and apr_sendfile() on Windows to see how this flag
>is used.
Yes But.
But why does that affect APR? We must support socket applications
other than Apache with apr, with no need to grok the internals of what
should be private structures.
If we have broken APR to support mpm_winnt's AcceptEx model, then
APR is broken. If you need to add extra flags to share the apr code with
the mpm, feel free, but we need a compliant APR sockets architecture.
We currently fail most of the network_io test suite. I am happy to commit
any patches that I can verify will improve our Win32 compliance with apr's
test suite. Patch authors, *please* indicate that your patch has already
passed the test suite when posting. If it requires several patches, please
post them separately and indicate which other patches are required.
And if our tests themselves are broken, patches there too are welcome :-)
Bill