On Mon, Feb 20, 2017 at 9:54 PM, Ruediger Pluem <rpl...@apache.org> wrote: > > > On 02/20/2017 02:38 PM, yla...@apache.org wrote: >> Author: ylavic >> Date: Mon Feb 20 13:38:03 2017 >> New Revision: 1783755 >> >> URL: http://svn.apache.org/viewvc?rev=1783755&view=rev >> Log: >> mpm_event: use a mutex for ptrans' allocator to be safe with concurrent >> creation and destruction of its subpools, like with mod_http2. > > Hm, doesn't that impact performance too much in the HTTP/1.1 case? It > requires the mutex to be hold not only during > creation / destruction of subpools, but also for all apr_palloc calls that > require the allocator to provide memory to > the pool. I guess there will be no contention in these cases as only one > thread will be using the pool, but still the > lock needs to be made.
Yes, quite possibly, I didn't try to measure it actually. The hard thing is that at the time ptrans is created, we don't know how it will be used. Maybe we could differ apr_allocator_mutex_set() at a later time, e.g. {pre,process}_connection hook? Regards, Yann.