On Thu, Oct 8, 2015 at 1:38 PM, Stefan Eissing
<stefan.eiss...@greenbytes.de> wrote:
>>
>> Can't tell about the other uses of ast_not_included() though...
>
> Often, mod_http2 needs to transfer a max amount of data. Sometimes
> it "moves" buckets from one brigade to another. Sometimes, it just
> needs to detect how much data *can* be moved.
>
> last_not_included is used to determine the bucket in a brigade that
> will not be moved with the length limit given.
>
> Since the brigade is already being inspected, it is useful to find
> out if a read would already encounter an EOS. This prevents the transfer
> from being invoked again. Since these transfer often require mutex locks, less
> is better.
>
> For the length limit, just data bucket lengths are counted. Meta buckets
> count as zero length. So, with a brigade
>
> (1)data[1024] -> (2)data[730] -> (3)EOS -> SENTINEL
>
> last_not_included(100) would be bucket 2.
> last_not_included(1024) would be bucket 2.
> last_not_included(1025) would be bucket 3.
> last_not_included(2048) would be bucket SENTINEL.

OK, the change I proposed was only for simplification, your patch
already handles that anyway.
So we can change that later if necessary, the code looks good to me now.

Thanks Stefan.

Reply via email to