You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Ruediger Pluem <rp...@apache.org> on 2008/11/25 08:35:29 UTC

Re: svn commit: r720374 - /apr/apr-util/trunk/include/apr_buckets.h


On 11/25/2008 02:26 AM, minfrin@apache.org wrote:
> Author: minfrin
> Date: Mon Nov 24 17:26:46 2008
> New Revision: 720374
> 
> URL: http://svn.apache.org/viewvc?rev=720374&view=rev
> Log:
> Clarify the behaviour of the apr_bucket_read() and apr_brigade_write()
> functions to lift some of the mystery surrounding how they work.
> 
> Modified:
>     apr/apr-util/trunk/include/apr_buckets.h
> 
> Modified: apr/apr-util/trunk/include/apr_buckets.h
> URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/include/apr_buckets.h?rev=720374&r1=720373&r2=720374&view=diff
> ==============================================================================
> --- apr/apr-util/trunk/include/apr_buckets.h (original)
> +++ apr/apr-util/trunk/include/apr_buckets.h Mon Nov 24 17:26:46 2008
> @@ -800,6 +800,20 @@

> + *
> + * Some buckets, such as the file bucket, might have a fixed size,
> + * but be significantly larger than is practical to store in RAM in
> + * one go. As with the socket bucket, if an attempt is made to read
> + * from a file bucket, the file bucket is magically morphed into a
> + * heap bucket containing a convenient amount of data read from the

IMHO this is not correct. It depends on whether MMAP is available and allowed.
If MMAP is available and allowed the file bucket is morphed into an
MMAP bucket of reasonable size.

Regards

RĂ¼diger

Re: svn commit: r720374 - /apr/apr-util/trunk/include/apr_buckets.h

Posted by Joe Orton <jo...@redhat.com>.
On Tue, Nov 25, 2008 at 08:35:29AM +0100, Ruediger Pluem wrote:
> On 11/25/2008 02:26 AM, minfrin@apache.org wrote:
> > URL: http://svn.apache.org/viewvc?rev=720374&view=rev
> > Log:
> > Clarify the behaviour of the apr_bucket_read() and apr_brigade_write()
> > functions to lift some of the mystery surrounding how they work.
...
> > --- apr/apr-util/trunk/include/apr_buckets.h (original)
> > +++ apr/apr-util/trunk/include/apr_buckets.h Mon Nov 24 17:26:46 2008
> > @@ -800,6 +800,20 @@
> 
> > + *
> > + * Some buckets, such as the file bucket, might have a fixed size,
> > + * but be significantly larger than is practical to store in RAM in
> > + * one go. As with the socket bucket, if an attempt is made to read
> > + * from a file bucket, the file bucket is magically morphed into a
> > + * heap bucket containing a convenient amount of data read from the
> 
> IMHO this is not correct. It depends on whether MMAP is available and 
> allowed. If MMAP is available and allowed the file bucket is morphed 
> into an MMAP bucket of reasonable size.

Right, but none of this should be part of the API contract.  The 
specific behaviour of any bucket type on _read() is an implementation 
detail.

joe

Re: svn commit: r720374 - /apr/apr-util/trunk/include/apr_buckets.h

Posted by Paul Querna <ch...@force-elite.com>.
Ruediger Pluem wrote:
> 
> On 11/25/2008 02:26 AM, minfrin@apache.org wrote:
>> Author: minfrin
>> Date: Mon Nov 24 17:26:46 2008
>> New Revision: 720374
>>
>> URL: http://svn.apache.org/viewvc?rev=720374&view=rev
>> Log:
>> Clarify the behaviour of the apr_bucket_read() and apr_brigade_write()
>> functions to lift some of the mystery surrounding how they work.
>>
>> Modified:
>>     apr/apr-util/trunk/include/apr_buckets.h
>>
>> Modified: apr/apr-util/trunk/include/apr_buckets.h
>> URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/include/apr_buckets.h?rev=720374&r1=720373&r2=720374&view=diff
>> ==============================================================================
>> --- apr/apr-util/trunk/include/apr_buckets.h (original)
>> +++ apr/apr-util/trunk/include/apr_buckets.h Mon Nov 24 17:26:46 2008
>> @@ -800,6 +800,20 @@
> 
>> + *
>> + * Some buckets, such as the file bucket, might have a fixed size,
>> + * but be significantly larger than is practical to store in RAM in
>> + * one go. As with the socket bucket, if an attempt is made to read
>> + * from a file bucket, the file bucket is magically morphed into a
>> + * heap bucket containing a convenient amount of data read from the
> 
> IMHO this is not correct. It depends on whether MMAP is available and allowed.
> If MMAP is available and allowed the file bucket is morphed into an
> MMAP bucket of reasonable size.

Yup, the auto-MMAP feature is quite cool :-)

(buckets buckets everywhere!)

(until we switch to serf at least!)

-Paul