On Wed, Jun 24, 2015 at 10:07 AM, Stefan Eissing
<stefan.eiss...@greenbytes.de> wrote:
> Hmm, yes, well. It's the thought that counts... ;-)
>
> I think this will not be enough, though, if I understood the failures of my 
> various attempts correctly. But it will certainly be good if more heads than 
> one have a go at this.
>
> Let Tm :-= main thread, Tw := worker thread, TmB() the main connection bucket 
> brigade, TwB() the worker (request) brigade.
>
> When a response from a worker starts:
>    TmB( , , , , , , , )       TwB(b1,b2,b3, , , , )
> so we move buckets across threads
>    TmB(b1,b2, , , , , , )       TwB(b3, , , , , , )
> and send b1 out and new response data arrives
>    TmB(b2, , , , , , , )       TwB(b3,b4, , , , , )
> we have the destruction of b1 and the creation of b4 that go against the same 
> bucket_alloc_t instance from two threads.
>
> Similar operations happen when b1 needs to be split or is a file bucket that 
> gets read. So refraining from destroying buckets in the main thread is not 
> enough.
>
> Have I missed something here?


One thing I missed was that the httpd thread did the writing vs the h2
thread. I thought the workers wrote but were serialized by the httpd
thread.

-- 
Eric Covener
cove...@gmail.com

Reply via email to