apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Bloom <...@covalent.net>
Subject Re: apr_buckets_file.c:file_read + XTHREAD
Date Wed, 28 Nov 2001 05:35:59 GMT
On Tuesday 27 November 2001 09:26 pm, Cliff Woolley wrote:
> On Tue, 27 Nov 2001, Ryan Bloom wrote:
> > Not good.  The problem is that you will take the real chance that
> > multiple filters will be converting to mmap, and then unmapping large
> > files without making any changes.  Think of a large SSI file that does
> > have any tags. You'll MMAP each piece, unmapping as you go, and then
> > you'll do the same thing again in the next filter.
> Um, why?  Once one filter mmap's the thing, it stays that way until the
> bucket is deleted or the bucket gets sent out onto the network.  It's not
> like mod_include says oh, I ended up not doing anything to that bucket, so
> I can map it back down to a file, right?  So mod_include leaves it as an
> mmap which it passes down the filter chain right away.  Only once it goes
> out on the network do we munmap it.  Granted, we might then have to mmap
> the next 4MB of the file when we return up the stack, but I don't see that
> as a problem.
> What am I missing?

Bill's idea was to map and then unmap the individual sections of the file, so
that no more than one section was mapped at a time.  If you do that, and you
really unmap each section as you map the next, you will be thrashing your
MMAPs.  If you are really going to leave each section as an MMAP, then I
would agree completely, and say let's do it, but that wasn't what Bill suggested.



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

View raw message