httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <...@covalent.net>
Subject Re: cvs commit: httpd-2.0 STATUS
Date Thu, 17 May 2001 23:35:21 GMT
On Thu, 17 May 2001, Cliff Woolley wrote:

> On Thu, 17 May 2001 rbb@covalent.net wrote:
>
> > >   +          - dup the cached apr_file_t into the request pool on each
> > >   +            request so that the MMAP is created in the request pool
> > >   +          - just cache the FD, not the whole apr_file_t.  Build the apr_file_t
> > >   +            and its apr_bucket_file in the request pool.
> > >   +          - add an extra parameter to apr_bucket_file_create() which is
the
> > >   +            pool that an MMAP (if any) for that file should be created in
> >
> > We don't need to dup the cached file.  Just use apr_os_get_file and
> > apr_os_put_file to move the file descriptor to the correct pool.  We don't
> > add a new cleanup, so the file won't be closed, but we will then be using
> > the correct pool when we create the MMAP.
>
> Right, so that basically fits in with option #2.  Option #1 has raised
> various concerns since it was first proposed, including concern over the
> possible expensiveness of dup() on some OS'es.  I just thought I'd
> document all of the reasonable suggestions for completeness-sake, though
> at this point I personally prefer one of the latter two options.

I'm sorry, you missed my point.  Cache the apr_file_t, but just use
apr_os_get_file and apr_os_put_file to create a new apr_file_t at the
begining of the request.  This saves us the cost of the dup(), and makes
us fully portable.

Ryan
_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Mime
View raw message