httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ruediger Pluem <>
Subject Re: [PATCH] mod_disk_cache working LFS (filecopy)
Date Tue, 26 Sep 2006 13:49:50 GMT

On 09/26/2006 01:00 PM, Joe Orton wrote:
> On Tue, Sep 26, 2006 at 10:52:18AM +0200, Niklas Edmundsson wrote:
>>This patch depends on "mod_disk_cache LFS-aware config" submitted 
>>earlier and is for trunk.
>>It makes caching of large files possible on 32bit machines by:
>>* Realising that a file is a file and can be copied as such, without
>>  reading the whole thing into memory first.
> This was discussed a while back.  I think this is an API problem which 
> needs to be fixed at API level, not something which should be worked 
> around by adding bucket-type-specific hacks.  The "store_body" callback 
> needs to be able to operate like a real output filter so it can avoid 
> the buffering-buckets-into-memory problem; as in:
> while (brigade not empty)
> 1. read data from bucket
> 2. write data to disk
> 3. pass bucket up output filter chain
> 4. delete bucket

I agree. But in the case that we want to save a file bucket, can't we use
sendfile in this case? Something like ap(r)_store_file_bucket which would
store it via sendfile or splice on Linux would be really neat. Of course
a lot more details would need to be worked out e.g. how and if this function
changes the file bucket and what happens to the position of the src and target
file pointers in the file.

Reading the data from the file bucket as in the example
above causes the file bucket to be transformed and thus we cannot use the advantage
of sendfile in the core output filter.



View raw message